home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / c / gcc261ud-c.lha / gnu / src-patches / gcc-2.6.1-amiga.diffs
Text File  |  1994-11-05  |  107KB  |  3,291 lines

  1. diff -2rcN gcc-2.6.1/ChangeLog gcc-2.6.1-amiga/ChangeLog
  2. *** gcc-2.6.1/ChangeLog    Wed Nov  2 02:32:40 1994
  3. --- gcc-2.6.1-amiga/ChangeLog    Fri Nov  4 11:02:35 1994
  4. ***************
  5. *** 2466,2469 ****
  6. --- 2466,2476 ----
  7.       * fixincludes: Rework required loop to avoid crash on decstation.
  8.   
  9. + Fri Aug 26 12:24:14 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
  10. +     * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
  11. +     accept an RTL_EXPR in what we're about to use for the instance,
  12. +     since anything which would end up with pcc_struct_return set
  13. +     inside cplus_expand_expr.
  14.   Thu Jul 14 09:42:23 1994  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
  15.   
  16. diff -2rcN gcc-2.6.1/Makefile.in gcc-2.6.1-amiga/Makefile.in
  17. *** gcc-2.6.1/Makefile.in    Fri Oct 28 23:00:38 1994
  18. --- gcc-2.6.1-amiga/Makefile.in    Fri Nov  4 11:02:36 1994
  19. ***************
  20. *** 66,74 ****
  21.   SHELL = /bin/sh
  22.   # on sysV, define this as cp.
  23. ! INSTALL = install -c
  24.   # These permit overriding just for certain files.
  25.   INSTALL_PROGRAM = $(INSTALL)
  26.   INSTALL_DATA = $(INSTALL)
  27. ! SYMLINK = ln -s
  28.   MAKEINFO = makeinfo
  29.   TEXI2DVI = texi2dvi
  30. --- 66,77 ----
  31.   SHELL = /bin/sh
  32.   # on sysV, define this as cp.
  33. ! INSTALL = cp
  34.   # These permit overriding just for certain files.
  35.   INSTALL_PROGRAM = $(INSTALL)
  36.   INSTALL_DATA = $(INSTALL)
  37. ! SYMLINK = cp
  38. ! # Some systems don't support hardlinks.  For this case, a simple copy
  39. ! # will achieve the same results for our purposes.
  40. ! HARDLINK = cp
  41.   MAKEINFO = makeinfo
  42.   TEXI2DVI = texi2dvi
  43. ***************
  44. *** 100,104 ****
  45.   
  46.   # Target to use when installing include directory.  Either
  47. ! # install-headers-tar or install-headers-cpio.
  48.   INSTALL_HEADERS_DIR = install-headers-tar
  49.   
  50. --- 103,107 ----
  51.   
  52.   # Target to use when installing include directory.  Either
  53. ! # install-headers-tar install-headers-cpio, or install-headers-cp.
  54.   INSTALL_HEADERS_DIR = install-headers-tar
  55.   
  56. ***************
  57. *** 106,110 ****
  58.   # Usually the one we just built.
  59.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  60. ! GCC_FOR_TARGET = ./xgcc -B./
  61.   
  62.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  63. --- 109,114 ----
  64.   # Usually the one we just built.
  65.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  66. ! XGCC = xgcc
  67. ! GCC_FOR_TARGET = ./$(XGCC) -B./
  68.   
  69.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  70. ***************
  71. *** 151,160 ****
  72.   # Common prefix for installation directories.
  73.   # NOTE: This directory must exist when you start installation.
  74. ! prefix = /usr/local
  75.   # Directory in which to put localized header files. On the systems with
  76.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  77.   # `/usr'.
  78.   # NOTE: local_prefix *should not* default from prefix.
  79. ! local_prefix = /usr/local
  80.   # Directory in which to put host dependent programs and libraries
  81.   exec_prefix = $(prefix)
  82. --- 155,167 ----
  83.   # Common prefix for installation directories.
  84.   # NOTE: This directory must exist when you start installation.
  85. ! prefix = /gnu
  86.   # Directory in which to put localized header files. On the systems with
  87.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  88.   # `/usr'.
  89. + # Similar considerations apply for toolkits located on non-writable storage,
  90. + # such as CD-ROM, where we need a completely separate place to put local
  91. + # include files.
  92.   # NOTE: local_prefix *should not* default from prefix.
  93. ! local_prefix = /gnu
  94.   # Directory in which to put host dependent programs and libraries
  95.   exec_prefix = $(prefix)
  96. ***************
  97. *** 622,626 ****
  98.   
  99.   # Dump a specs file to make -B./ read these specs over installed ones.
  100. ! specs: xgcc
  101.       $(GCC_FOR_TARGET) -dumpspecs > specs
  102.   
  103. --- 629,633 ----
  104.   
  105.   # Dump a specs file to make -B./ read these specs over installed ones.
  106. ! specs: xgcc xgccv
  107.       $(GCC_FOR_TARGET) -dumpspecs > specs
  108.   
  109. ***************
  110. *** 839,844 ****
  111.   # message from ar, we make sure all files are writable.
  112.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  113. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  114. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  115.       rm -rf tmpcopy
  116.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  117. --- 846,852 ----
  118.   # message from ar, we make sure all files are writable.
  119.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  120. ! # The "cd..; wait" makes sure that the lock on tmpcopy has time to disappear.
  121. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
  122. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o; cd ..; /c/wait 2)
  123.       rm -rf tmpcopy
  124.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  125. ***************
  126. *** 912,919 ****
  127.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  128.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  129. !       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  130.         GCC_CFLAGS="$(GCC_CFLAGS)"
  131.       -rm -f libobjc.a
  132. !     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  133.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  134.   
  135. --- 920,927 ----
  136.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  137.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  138. !       GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  139.         GCC_CFLAGS="$(GCC_CFLAGS)"
  140.       -rm -f libobjc.a
  141. !     cp objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  142.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  143.   
  144. ***************
  145. *** 925,929 ****
  146.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  147.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  148. !       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  149.         GCC_CFLAGS="$(GCC_CFLAGS)"
  150.   
  151. --- 933,937 ----
  152.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  153.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  154. !       GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
  155.         GCC_CFLAGS="$(GCC_CFLAGS)"
  156.   
  157. ***************
  158. *** 976,980 ****
  159.   ld: collect2
  160.       rm -f ld
  161. !     ln collect2 ld
  162.   
  163.   collect2 : collect2.o version.o $(LIBDEPS)
  164. --- 984,988 ----
  165.   ld: collect2
  166.       rm -f ld
  167. !     $(HARDLINK) collect2 ld
  168.   
  169.   collect2 : collect2.o version.o $(LIBDEPS)
  170. ***************
  171. *** 1491,1495 ****
  172.   cpp: cccp
  173.       -rm -f cpp
  174. !     ln cccp cpp
  175.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  176.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  177. --- 1499,1503 ----
  178.   cpp: cccp
  179.       -rm -f cpp
  180. !     $(HARDLINK) cccp cpp
  181.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  182.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  183. ***************
  184. *** 1651,1655 ****
  185.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  186.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  187. !     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  188.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  189.       touch objc-headers
  190. --- 1659,1663 ----
  191.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  192.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  193. !     GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  194.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  195.       touch objc-headers
  196. ***************
  197. *** 1832,1835 ****
  198. --- 1840,1844 ----
  199.       -rm -fr stage1 stage2 stage3 stage4
  200.       -rm -f */stage1 */stage2 */stage3 */stage4 */include
  201. +     -rm -f cp-parse.output
  202.       -rm -f objc-parse.output
  203.       -rm -f c-parse.output
  204. ***************
  205. *** 1955,1959 ****
  206.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  207.         rm -f $(bindir)/$(target)-gcc-1; \
  208. !       ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  209.         mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  210.       fi
  211. --- 1964,1968 ----
  212.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  213.         rm -f $(bindir)/$(target)-gcc-1; \
  214. !       $(HARDLINK) $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  215.         mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  216.       fi
  217. ***************
  218. *** 2031,2035 ****
  219.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  220.             rm -f $(libsubdir)/include/$$i; \
  221. !           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  222.           fi; \
  223.         done; \
  224. --- 2040,2044 ----
  225.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  226.             rm -f $(libsubdir)/include/$$i; \
  227. !           $(HARDLINK) -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  228.           fi; \
  229.         done; \
  230. ***************
  231. *** 2054,2057 ****
  232. --- 2063,2070 ----
  233.       (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  234.   
  235. + # Install the include directory using simple recursive copy.
  236. + install-headers-cp: stmp-headers install-include-dir
  237. +     cd include; cp -r . $(libsubdir)/include
  238.   # Put assert.h where it won't override GNU libc's assert.h.
  239.   # It goes in a dir that is searched after GNU libc's headers;
  240. ***************
  241. *** 2143,2147 ****
  242.       mkdir tmp/objc
  243.       for file in *[0-9a-zA-Z+]; do \
  244. !       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  245.       done
  246.       cd config; \
  247. --- 2156,2160 ----
  248.       mkdir tmp/objc
  249.       for file in *[0-9a-zA-Z+]; do \
  250. !       $(HARDLINK) $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  251.       done
  252.       cd config; \
  253. ***************
  254. *** 2151,2160 ****
  255.           cd $$file; \
  256.           for subfile in *[0-9a-zA-Z+]; do \
  257. !           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  258.             || cp $$subfile ../../tmp/config/$$file; \
  259.           done; \
  260.           cd ..; \
  261.         else \
  262. !         ln $$file ../tmp/config >/dev/null 2>&1 \
  263.           || cp $$file ../tmp/config; \
  264.         fi; \
  265. --- 2164,2173 ----
  266.           cd $$file; \
  267.           for subfile in *[0-9a-zA-Z+]; do \
  268. !           $(HARDLINK) $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  269.             || cp $$subfile ../../tmp/config/$$file; \
  270.           done; \
  271.           cd ..; \
  272.         else \
  273. !         $(HARDLINK) $$file ../tmp/config >/dev/null 2>&1 \
  274.           || cp $$file ../tmp/config; \
  275.         fi; \
  276. ***************
  277. *** 2166,2172 ****
  278.       cd objc; \
  279.       for file in *[0-9a-zA-Z+]; do \
  280. !       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  281.       done
  282. !     ln .gdbinit tmp
  283.   
  284.   # Finish making `distdir', after the languages have done their thing.
  285. --- 2179,2185 ----
  286.       cd objc; \
  287.       for file in *[0-9a-zA-Z+]; do \
  288. !       $(HARDLINK) $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  289.       done
  290. !     $(HARDLINK) .gdbinit tmp
  291.   
  292.   # Finish making `distdir', after the languages have done their thing.
  293. ***************
  294. *** 2196,2210 ****
  295.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  296.   maketest:
  297. !     ln -s $(DIR)/*.[chy] .
  298. !     ln -s $(DIR)/configure .
  299. !     ln -s $(DIR)/*.def .
  300.       -rm -f =*
  301. !     ln -s $(DIR)/.gdbinit .
  302. !     ln -s $(DIR)/$(FIXINCLUDES) .
  303. !     -ln -s $(DIR)/bison.simple .
  304. !     ln -s $(DIR)/config .
  305. !     ln -s $(DIR)/move-if-change .
  306.   # The then and else were swapped to avoid a problem on Ultrix.
  307. !     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  308.       -rm tm.h aux-output.c config.h md
  309.       make clean
  310. --- 2209,2223 ----
  311.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  312.   maketest:
  313. !     $(SYMLINK) $(DIR)/*.[chy] .
  314. !     $(SYMLINK) $(DIR)/configure .
  315. !     $(SYMLINK) $(DIR)/*.def .
  316.       -rm -f =*
  317. !     $(SYMLINK) $(DIR)/.gdbinit .
  318. !     $(SYMLINK) $(DIR)/$(FIXINCLUDES) .
  319. !     -$(SYMLINK) $(DIR)/bison.simple .
  320. !     $(SYMLINK) $(DIR)/config .
  321. !     $(SYMLINK) $(DIR)/move-if-change .
  322.   # The then and else were swapped to avoid a problem on Ultrix.
  323. !     if [ ! -f Makefile ] ; then $(SYMLINK) $(DIR)/Makefile .; else false; fi
  324.       -rm tm.h aux-output.c config.h md
  325.       make clean
  326. ***************
  327. *** 2222,2236 ****
  328.   # because alloca.o is newer, we permit these recursive makes to compile
  329.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  330. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  331.       $(MAKE) stage2
  332. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  333.   
  334.   bootstrap2: force
  335. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  336.       $(MAKE) stage2
  337. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  338.   
  339.   bootstrap3: force
  340. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  341.   
  342.   # Compare the object files in the current directory with those in the
  343. --- 2235,2249 ----
  344.   # because alloca.o is newer, we permit these recursive makes to compile
  345.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  346. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  347.       $(MAKE) stage2
  348. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  349.   
  350.   bootstrap2: force
  351. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  352.       $(MAKE) stage2
  353. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  354.   
  355.   bootstrap3: force
  356. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  357.   
  358.   # Compare the object files in the current directory with those in the
  359. ***************
  360. *** 2307,2311 ****
  361.       -for dir in . $(SUBDIRS) ; \
  362.        do \
  363. !        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
  364.        done
  365.       -mv $(STAGESTUFF) stage1
  366. --- 2320,2324 ----
  367.       -for dir in . $(SUBDIRS) ; \
  368.        do \
  369. !        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi; \
  370.        done
  371.       -mv $(STAGESTUFF) stage1
  372. ***************
  373. *** 2319,2323 ****
  374.       -for dir in . $(SUBDIRS) ; \
  375.        do \
  376. !        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
  377.        done
  378.       -mv $(STAGESTUFF) stage2
  379. --- 2332,2336 ----
  380.       -for dir in . $(SUBDIRS) ; \
  381.        do \
  382. !        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi; \
  383.        done
  384.       -mv $(STAGESTUFF) stage2
  385. ***************
  386. *** 2331,2335 ****
  387.       -for dir in . $(SUBDIRS) ; \
  388.        do \
  389. !        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
  390.        done
  391.       -mv $(STAGESTUFF) stage3
  392. --- 2344,2348 ----
  393.       -for dir in . $(SUBDIRS) ; \
  394.        do \
  395. !        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi; \
  396.        done
  397.       -mv $(STAGESTUFF) stage3
  398. ***************
  399. *** 2343,2347 ****
  400.       -for dir in . $(SUBDIRS) ; \
  401.        do \
  402. !        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
  403.        done
  404.       -mv $(STAGESTUFF) stage4
  405. --- 2356,2360 ----
  406.       -for dir in . $(SUBDIRS) ; \
  407.        do \
  408. !        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi; \
  409.        done
  410.       -mv $(STAGESTUFF) stage4
  411. diff -2rcN gcc-2.6.1/calls.c gcc-2.6.1-amiga/calls.c
  412. *** gcc-2.6.1/calls.c    Mon Oct 17 23:03:19 1994
  413. --- gcc-2.6.1-amiga/calls.c    Fri Nov  4 11:02:37 1994
  414. ***************
  415. *** 2169,2172 ****
  416. --- 2169,2180 ----
  417.     argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  418.   
  419. + #if defined (__amigados__)
  420. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  421. + #ifdef ENCODE_SECTION_INFO
  422. +   /* mark it as a function (to be in the text section that is) */
  423. +   SYMBOL_REF_FLAG (fun) = 1;
  424. + #endif
  425. + #endif
  426.     INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  427.   
  428. diff -2rcN gcc-2.6.1/cccp.c gcc-2.6.1-amiga/cccp.c
  429. *** gcc-2.6.1/cccp.c    Tue Oct 25 22:37:44 1994
  430. --- gcc-2.6.1-amiga/cccp.c    Fri Nov  4 11:02:38 1994
  431. ***************
  432. *** 40,43 ****
  433. --- 40,59 ----
  434.   #endif /* not EMACS */
  435.   
  436. + #ifdef amigados
  437. + /* Since cpp uses alloca to store all its read files, this is quite deadly
  438. +    on a system with non-automatic stackgrowth like amigados, so we better
  439. +    turn it off now.  Normally alloca is #defined to __builtin_alloca, so
  440. +    undefining it causes an external alloca to be used.
  441. +    Note that it's not wise to generally inhibit __builtin_alloca, since
  442. +    using the generic emulator entitels a serious (!) speed penalty, and
  443. +    it's bad enough that we have to live with it in cccp, don't make cc1
  444. +    unbearably slow as well... */
  445. + #undef alloca
  446. + static int amigados_abs_filename ();
  447. + #endif
  448.   #ifndef STANDARD_INCLUDE_DIR
  449.   #define STANDARD_INCLUDE_DIR "/usr/include"
  450. ***************
  451. *** 366,369 ****
  452. --- 382,392 ----
  453.   static int max_include_len;
  454.   
  455. + #ifdef amigados
  456. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  457. + static int amiga_priority = -1;
  458. + #include <proto/exec.h>
  459. + struct Task *amiga_task;
  460. + #endif /* amigados */
  461.   /* Nonzero means turn NOTREACHED into #pragma NOTREACHED etc */
  462.   
  463. ***************
  464. *** 1338,1341 ****
  465. --- 1361,1374 ----
  466.   
  467.         case 'p':
  468. + #ifdef amigados
  469. +     if (!strcmp (argv[i], "-priority")) {
  470. +       if (i + 1 == argc)
  471. +         fatal ("Priority missing after -P option");
  472. +           if ((amiga_priority = atoi(argv[++i])) < -25)
  473. +         amiga_priority = -25;
  474. +           else if (amiga_priority > 25)
  475. +         amiga_priority = 25;
  476. +         } else
  477. + #endif /* amigados */
  478.       if (!strcmp (argv[i], "-pedantic"))
  479.         pedantic = 1;
  480. ***************
  481. *** 1627,1630 ****
  482. --- 1660,1670 ----
  483.     }
  484.   
  485. + #ifdef amigados
  486. +   Forbid();
  487. +   amiga_task = FindTask(NULL);
  488. +   Permit();
  489. +   SetTaskPri(amiga_task, amiga_priority);
  490. + #endif /* amigados */
  491.     /* Add dirs from CPATH after dirs from -I.  */
  492.     /* There seems to be confusion about what CPATH should do,
  493. ***************
  494. *** 1989,1992 ****
  495. --- 2029,2035 ----
  496.   
  497.         /* Discard all directory prefixes from filename.  */
  498. + #ifdef FILE_NAME_NONDIRECTORY
  499. +       q = FILE_NAME_NONDIRECTORY (in_fname);
  500. + #else
  501.         if ((q = rindex (in_fname, '/')) != NULL
  502.   #ifdef DIR_SEPARATOR
  503. ***************
  504. *** 1997,2001 ****
  505.         else
  506.       q = in_fname;
  507.         /* Copy remainder to mungable area.  */
  508.         p = (char *) alloca (strlen(q) + 8);
  509. --- 2040,2044 ----
  510.         else
  511.       q = in_fname;
  512. ! #endif
  513.         /* Copy remainder to mungable area.  */
  514.         p = (char *) alloca (strlen(q) + 8);
  515. ***************
  516. *** 3795,3799 ****
  517. --- 3838,3847 ----
  518.         if (!no_output && already_output == 0
  519.         && (kt->pass_thru
  520. + /* Phil.B 27-Mar-93 not quiet sure to keep this old fix */      
  521. + #ifdef maybe_amigados
  522. +           || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
  523. + #else
  524.             || (kt->type == T_DEFINE
  525. + #endif /* amigados */
  526.             && (dump_macros == dump_names
  527.                 || dump_macros == dump_definitions)))) {
  528. ***************
  529. *** 4137,4140 ****
  530. --- 4185,4200 ----
  531.   #ifndef VMS
  532.           ep = rindex (nam, '/');
  533. + #ifdef amigados
  534. +         /* amigados uses unix-style directory-filename separation, but
  535. +            has VMS-style logicals as well */
  536. +         if (ep == NULL) 
  537. +           {
  538. +         ep = rindex (nam, ':');
  539. +         /* a ':' is part of the directory name, a '/' isn't ! */
  540. +             if (ep != NULL) ep++;
  541. +           }
  542. + #endif /* amigados */
  543.   #else                /* VMS */
  544.           ep = rindex (nam, ']');
  545. ***************
  546. *** 4238,4242 ****
  547. --- 4298,4306 ----
  548.     /* If specified file name is absolute, just open it.  */
  549.   
  550. + #ifndef amigados
  551.     if (*fbeg == '/') {
  552. + #else
  553. +   if (amigados_abs_filename (fbeg, flen)) {
  554. + #endif
  555.       strncpy (fname, fbeg, flen);
  556.       fname[flen] = 0;
  557. ***************
  558. *** 4261,4264 ****
  559. --- 4325,4332 ----
  560.         continue;
  561.       strcpy (fname, searchptr->fname);
  562. + #ifdef amigados
  563. +     if (fname[strlen (fname) - 1] != ':')
  564. + #endif
  565.       strcat (fname, "/");
  566.       fname[strlen (fname) + flen] = 0;
  567. ***************
  568. *** 9972,9973 ****
  569. --- 10040,10065 ----
  570.   }
  571.   #endif /* VMS */
  572. + #ifdef amigados
  573. + /* This function returns whether the LEN characters long filename FNAME 
  574. +    is an absolute path specification. */
  575. + static int
  576. + amigados_abs_filename (fname, len)
  577. +      char *fname;
  578. +      int len;
  579. + {
  580. +   /* we're using ixemul.library, which treats `/foo' as `foo:', so 
  581. +      fname[0] is to be considered absolute as well */
  582. +   if (fname[0] == '/')
  583. +     return 1;
  584. +   /* else do an index() on fname, but one which is limited to len characters */
  585. +   while (*fname && *fname != ':' && len) 
  586. +     fname++, len--;
  587. +   return *fname == ':';
  588. + }
  589. + #endif /* amigados */
  590. diff -2rcN gcc-2.6.1/config/m68k/amigados.c gcc-2.6.1-amiga/config/m68k/amigados.c
  591. *** gcc-2.6.1/config/m68k/amigados.c
  592. --- gcc-2.6.1-amiga/config/m68k/amigados.c    Fri Nov  4 11:02:39 1994
  593. ***************
  594. *** 0 ****
  595. --- 1,158 ----
  596. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  597. +    Copyright (C) 1992 Free Software Foundation, Inc.
  598. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  599. + This file is part of GNU CC.
  600. + GNU CC is free software; you can redistribute it and/or modify
  601. + it under the terms of the GNU General Public License as published by
  602. + the Free Software Foundation; either version 2, or (at your option)
  603. + any later version.
  604. + GNU CC is distributed in the hope that it will be useful,
  605. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  606. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  607. + GNU General Public License for more details.
  608. + You should have received a copy of the GNU General Public License
  609. + along with GNU CC; see the file COPYING.  If not, write to
  610. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  611. + #include "m68k/m68k.c"
  612. + /* Does operand (which is a symbolic_operand) live in text space? If
  613. +    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
  614. +    This function is used in base relative code generation. */
  615. + int
  616. + read_only_operand (operand)
  617. +      rtx operand;
  618. + {
  619. +   if (GET_CODE (operand) == CONST)
  620. +     operand = XEXP (XEXP (operand, 0), 0);
  621. +   if (GET_CODE (operand) == SYMBOL_REF)
  622. +     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  623. +   return 1;
  624. + }
  625. + /* the rest of the file is to implement AmigaDOS specific keywords some day.
  626. +    The approach used so far used __attribute__ for this, but this required
  627. +    changes to c-parse.y as well as if we'd use the common keywords used
  628. +    on commercial AmigaDOS C-compilers as well. So in the future I'll probably
  629. +    switch to __saveds and __interrupt keywords as well.
  630. +    The rest of this file is currently ignored, because it's no longer
  631. +    working with the current gcc version. */
  632. + #if not_yet_working
  633. + #include "tree.h"
  634. + struct attribute {
  635. +   tree ident;
  636. +   int  saveds : 1,
  637. +        interrupt : 1;
  638. + };
  639. + static struct attribute *a_tab = 0;
  640. + static int a_index, a_size;
  641. + void
  642. + add_attr_entry (attr)
  643. +     struct attribute *attr;
  644. + {
  645. +   if (! a_tab)
  646. +     {
  647. +       a_size = 10;
  648. +       a_index = 0;
  649. +       a_tab  = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
  650. +     }
  651. +   if (a_index == a_size)
  652. +     {
  653. +       a_size <<= 1;
  654. +       a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
  655. +     }
  656. +   a_tab[a_index++] = *attr;
  657. + }
  658. + void
  659. + attr_do_saveds (function_ident)
  660. +       tree function_ident;
  661. + {
  662. +   struct attribute attr, *a;
  663. +   int i;
  664. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  665. +     if (a->ident == function_ident)
  666. +       {
  667. +     a->saveds = 1;
  668. +     return;
  669. +       }
  670. +   /* create a new entry for this function */
  671. +   attr.ident     = function_ident;
  672. +   attr.saveds    = 1;
  673. +   attr.interrupt = 0;
  674. +   add_attr_entry (&attr);
  675. + }
  676. + void
  677. + attr_do_interrupt (function_ident)
  678. +     tree function_ident;
  679. + {
  680. +   struct attribute attr, *a;
  681. +   int i;
  682. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  683. +     if (a->ident == function_ident)
  684. +       {
  685. +     /* __interrupt implies __saveds */
  686. +     a->saveds    = 1;
  687. +     a->interrupt = 1;
  688. +     return;
  689. +       }
  690. +   /* create a new entry for this function */
  691. +   attr.ident     = function_ident;
  692. +   attr.saveds     = 1;
  693. +   attr.interrupt = 1;
  694. +   add_attr_entry (&attr);
  695. + }
  696. + int
  697. + attr_does_saveds (function_name)
  698. +     char *function_name;
  699. + {
  700. +   tree ident = get_identifier (function_name);
  701. +   struct attribute *attr;
  702. +   int i;
  703. +   
  704. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  705. +     if (attr->ident == ident)
  706. +       return attr->saveds;
  707. +   return 0;
  708. + }
  709. + int
  710. + attr_does_interrupt (function_name)
  711. +     char *function_name;
  712. + {
  713. +   tree ident = get_identifier (function_name);
  714. +   struct attribute *attr;
  715. +   int i;
  716. +   
  717. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  718. +     if (attr->ident == ident)
  719. +       return attr->interrupt;
  720. +   return 0;
  721. + }
  722. + #endif
  723. diff -2rcN gcc-2.6.1/config/m68k/amigados.h gcc-2.6.1-amiga/config/m68k/amigados.h
  724. *** gcc-2.6.1/config/m68k/amigados.h
  725. --- gcc-2.6.1-amiga/config/m68k/amigados.h    Fri Nov  4 11:02:40 1994
  726. ***************
  727. *** 0 ****
  728. --- 1,425 ----
  729. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  730. +    Copyright (C) 1992 Free Software Foundation, Inc.
  731. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  732. + This file is part of GNU CC.
  733. + GNU CC is free software; you can redistribute it and/or modify
  734. + it under the terms of the GNU General Public License as published by
  735. + the Free Software Foundation; either version 2, or (at your option)
  736. + any later version.
  737. + GNU CC is distributed in the hope that it will be useful,
  738. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  739. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  740. + GNU General Public License for more details.
  741. + You should have received a copy of the GNU General Public License
  742. + along with GNU CC; see the file COPYING.  If not, write to
  743. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  744. + #include "m68k/m68k.h"
  745. + /* See m68k.h for bits in TARGET_DEFAULT.
  746. +    0 means 68000, no hardware fpu (68881/68882/68040).
  747. +    7 means 68020 (or higher) with hardware fpu.  */
  748. + #ifndef TARGET_DEFAULT
  749. + #define TARGET_DEFAULT 0
  750. + #endif
  751. + /* Define __HAVE_68881__ in preprocessor according to the -m flags.
  752. +    This will control the use of inline 68881 insns in certain macros.
  753. +    Also inform the program which CPU this is for.  */
  754. + #if TARGET_DEFAULT & 02
  755. + /* -m68881 is the default */
  756. + #define CPP_SPEC \
  757. + "%{!msoft-float:-D__HAVE_68881__ }\
  758. + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  759. + %{mc68040:-Dmc68040}%{!mc68000:%{!m68000:-Dmc68020}}}"
  760. + #else
  761. + /* -msoft-float is the default, assume -mc68000 as well */
  762. + #define CPP_SPEC \
  763. + "%{m68881:-D__HAVE_68881__ }\
  764. + %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  765. + %{mc68040:-Dmc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-Dmc68010}}}}}}}"
  766. + /* Don't try using XFmode since we don't have appropriate runtime software
  767. +    support.  */
  768. + #undef LONG_DOUBLE_TYPE_SIZE
  769. + #define LONG_DOUBLE_TYPE_SIZE 64
  770. + #endif
  771. + /* -m68000 requires special flags to the assembler.  */
  772. + #if TARGET_DEFAULT & 01
  773. + #define ASM_SPEC \
  774. +  "%{m68000:-mc68010}%{mc68000:-mc68010}%{mc68030:-mc68030}%{m68030:-mc68030}%{mc68040:-mc68040}%{m68040:-mc68040}\
  775. + %{!mc68000:%{!m68000:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-mc68020}}}}}} %{msmall-code:-l}"
  776. + #else
  777. + #define ASM_SPEC \
  778. +  "%{m68020:-mc68020}%{mc68020:-mc68020}%{mc68030:-mc68030}%{m68030:-mc68030}%{mc68040:-mc68040}\
  779. + %{m68040:-mc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-mc68010}}}}}} %{msmall-code:-l}"
  780. + #endif
  781. + /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
  782. +  * was used before and is included for compatibility reasons */
  783. + #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA"
  784. + /* Choose the right startup file, depending on whether we use base relative
  785. +    code, base relative code with automatic relocation (-resident), or plain
  786. +    crt0.o. 
  787. +   
  788. +    Profiling is currently only available for plain startup.
  789. +    mcrt0.o does not (yet) exist. */
  790. + #define STARTFILE_SPEC \
  791. +  "%{!noixemul:%{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
  792. + %{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}}\
  793. + %{noixemul:%{resident:libnix/nrcrt0.o%s}%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}}}"
  794. + #define ENDFILE_SPEC "%{noixemul:-lstubs}"
  795. + /* Automatically search libamiga.a for AmigaDOS specific functions.  Note
  796. +    that we first search the standard C library to resolve as much as
  797. +    possible from there, since it has names that are duplicated in libamiga.a
  798. +    which we *don't* want from there.  Then search the standard C library
  799. +    again to resolve any references that libamiga.a might have generated.
  800. +    This may only be a temporary solution since it might be better to simply
  801. +    remove the things from libamiga.a that should be pulled in from libc.a
  802. +    instead, which would eliminate the first reference to libc.a. */
  803. + #define LIB_SPEC "%{!noixemul:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}%{noixemul:-lnixmain -lnix -lamiga}"
  804. + /* if debugging, tell the linker to output amiga-hunk symbols *and* a BSD
  805. +    compatible debug hunk (which will probably change in the future, it's not
  806. +    tremendously useful in its current state). */
  807. + #define LINK_SPEC "%{noixemul:-shortdata -fl libnix} %{fbaserel:%{!resident:-databss-together -fl libb}}\
  808. + %{resident:-databss-together -datadata-reloc -fl libb} %{g:-amiga-debug-hunk}\
  809. + %{m68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020}"
  810. + #define CC1_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel} "
  811. + #define CC1PLUS_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel} "
  812. + /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
  813. +    GDB doesn't work under AmigaDOS at the moment anyway..) */
  814. +   
  815. + #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
  816. + {                                  \
  817. +   if (OPTIMIZE >= 2)                         \
  818. +     flag_omit_frame_pointer = 1;                \
  819. + }
  820. + /* provide a dummy entry for the small-code switch. This is currently only
  821. +    needed by the assembler (explanations: m68k.h), but will be used by cc1
  822. +    to output 16bit pc-relative code later. */
  823. + #undef TARGET_SWITCHES
  824. + #define TARGET_SWITCHES  \
  825. +   { { "68020", 5},                \
  826. +     { "c68020", 5},                \
  827. +     { "68881", 2},                \
  828. +     { "bitfield", 4},                \
  829. +     { "68000", -5},                \
  830. +     { "c68000", -5},                \
  831. +     { "soft-float", -0102},            \
  832. +     { "nobitfield", -4},            \
  833. +     { "rtd", 8},                \
  834. +     { "nortd", -8},                \
  835. +     { "short", 040},                \
  836. +     { "noshort", -040},                \
  837. +     { "fpa", 0100},                \
  838. +     { "nofpa", -0100},                \
  839. +     { "sky", 0200},                \
  840. +     { "nosky", -0200},                \
  841. +     { "68040", 0407},                \
  842. +     { "68030", -01400},                \
  843. +     { "68030", 7},                \
  844. +     { "68040-only", 01000},            \
  845. +     { "small-code", 0 },            \
  846. +     { "", TARGET_DEFAULT}}
  847. + /* Every structure or union's size must be a multiple of 2 bytes.  */
  848. + #define STRUCTURE_SIZE_BOUNDARY 16
  849. + /* This is (almost;-)) BSD, so it wants DBX format.  */
  850. + #define DBX_DEBUGGING_INFO
  851. + /* Allow folding division by zero.  */
  852. + #define REAL_INFINITY
  853. + /* The following was hacked into final.c, to allow some notice of
  854. +  * source line and filename to be injected into the assembly code,
  855. +  * even if not using one of the "approved" debuggers (albaugh@agames.com).
  856. +  */
  857. + #if 0
  858. + #define ASM_NOTE_SOURCE_LINE(FILE, LINE, FILENAME)\
  859. +   fprintf(file,"*#line %d \"%s\"\n",(LINE),(FILENAME))
  860. + #endif
  861. + #if 0    /* This apparently is no longer necessary? */
  862. + /* This is how to output an assembler line defining a `double' constant.  */
  863. + #undef ASM_OUTPUT_DOUBLE
  864. + #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  865. +   {                                    \
  866. +     if (REAL_VALUE_ISINF (VALUE))                    \
  867. +       fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  868. +     else if (isnan (VALUE))                        \
  869. +       {                                    \
  870. +     union { double d; long l[2];} t;                \
  871. +     t.d = (VALUE);                            \
  872. +     fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
  873. +       }                                    \
  874. +     else                                \
  875. +       fprintf (FILE, "\t.double 0r%.17g\n", VALUE);            \
  876. +   }
  877. + /* This is how to output an assembler line defining a `float' constant.  */
  878. + #undef ASM_OUTPUT_FLOAT
  879. + #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  880. +   {                                    \
  881. +     if (REAL_VALUE_ISINF (VALUE))                    \
  882. +       fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  883. +     else if (isnan (VALUE))                        \
  884. +       {                                    \
  885. +     union { float f; long l;} t;                    \
  886. +     t.f = (VALUE);                            \
  887. +     fprintf (FILE, "\t.long 0x%lx\n", t.l);                \
  888. +       }                                    \
  889. +     else                                \
  890. +       fprintf (FILE, "\t.single 0r%.9g\n", VALUE);            \
  891. +   }
  892. + /* This is how to output an assembler lines defining floating operands.
  893. +    There's no way to output a NaN's fraction, so we lose it.  */
  894. +   
  895. + #undef ASM_OUTPUT_FLOAT_OPERAND
  896. + #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)                \
  897. +  do {                                \
  898. +       if (CODE == 'f')                        \
  899. +         {                            \
  900. +           (REAL_VALUE_ISINF ((VALUE))                        \
  901. +            ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  902. +            : (VALUE) == -0.0                            \
  903. +            ? asm_fprintf (FILE, "%I0r-0.0")                    \
  904. +            : asm_fprintf (FILE, "%I0r%.9g", (VALUE))) \
  905. +         } else {                                        \
  906. +           long l;                        \
  907. +           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  908. +           if (sizeof (int) == sizeof (long))            \
  909. +             asm_fprintf ((FILE), "%I0x%x", l);            \
  910. +           else                            \
  911. +             asm_fprintf ((FILE), "%I0x%lx", l);            \
  912. +         }                            \
  913. +      } while (0)
  914. + #undef ASM_OUTPUT_DOUBLE_OPERAND
  915. + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  916. +   (REAL_VALUE_ISINF ((VALUE))                        \
  917. +    ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  918. +    : (VALUE) == -0.0                            \
  919. +    ? asm_fprintf (FILE, "%I0r-0.0")                    \
  920. +    : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
  921. + #endif    /* 0 */
  922. + /* use A5 as framepointer instead of A6, this makes A6 available as a
  923. +    general purpose register, and can thus be used without problems in
  924. +    direct library calls. */
  925. + #undef FRAME_POINTER_REGNUM
  926. + #define FRAME_POINTER_REGNUM 13
  927. + #undef ARG_POINTER_REGNUM
  928. + #define ARG_POINTER_REGNUM 13
  929. + /* we use A4 for this, not A5, which is the framepointer */
  930. + #undef PIC_OFFSET_TABLE_REGNUM
  931. + #define PIC_OFFSET_TABLE_REGNUM 12
  932. + /* setup a default shell return value for those (gazillion..) programs that
  933. +    (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
  934. +    cause the shell to randomly caugh upon executing such programs (contrary
  935. +    to Unix, AmigaDOS scripts are terminated with an error if a program returns
  936. +    with an error code above the `error' or even `failure' level
  937. +    (which is configurable with the FAILAT command) */
  938. + #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
  939. + /* we do have an ansi-compliant c-library ;-) */
  940. + #define HAVE_VPRINTF
  941. + #define HAVE_VFPRINTF
  942. + #define HAVE_PUTENV
  943. + #define HAVE_STRERROR
  944. + #define HAVE_ATEXIT
  945. + /* given that symbolic_operand(X), return TRUE if no special
  946. +    base relative relocation is necessary */
  947. + #define LEGITIMATE_BASEREL_OPERAND_P(X) \
  948. +   (flag_pic >= 3 && read_only_operand (X))
  949. + #undef LEGITIMATE_PIC_OPERAND_P
  950. + #define LEGITIMATE_PIC_OPERAND_P(X) \
  951. +   (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
  952. + /* Define this macro if references to a symbol must be treated
  953. +    differently depending on something about the variable or
  954. +    function named by the symbol (such as what section it is in).
  955. +    The macro definition, if any, is executed immediately after the
  956. +    rtl for DECL or other node is created.
  957. +    The value of the rtl will be a `mem' whose address is a
  958. +    `symbol_ref'.
  959. +    The usual thing for this macro to do is to a flag in the
  960. +    `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
  961. +    name string in the `symbol_ref' (if one bit is not enough
  962. +    information).
  963. +    On the Amiga we use this to indicate if a symbol is in text or
  964. +    data space.  */
  965. + #define ENCODE_SECTION_INFO(DECL)\
  966. + do                                    \
  967. +   {                                    \
  968. +     if (TREE_CODE (DECL) == FUNCTION_DECL)                \
  969. +       SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;            \
  970. +     else                                \
  971. +       {                                    \
  972. +     rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'        \
  973. +            ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));        \
  974. +     if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl))        \
  975. +       SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;                \
  976. +       }                                    \
  977. +   }                                    \
  978. + while (0)
  979. + #undef SELECT_RTX_SECTION
  980. + #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
  981. + /* according to varasm.c, RELOC referrs *only* to whether constants (!)
  982. +    are addressed by address. This doesn't matter in baserelative code,
  983. +    so we allow (inspite of flag_pic) readonly_data_section() in that
  984. +    case */
  985. + #undef SELECT_SECTION
  986. + #define SELECT_SECTION(DECL, RELOC)                    \
  987. + {                                    \
  988. +   if (TREE_CODE (DECL) == STRING_CST)                    \
  989. +     {                                    \
  990. +       if (! flag_writable_strings)                    \
  991. +     readonly_data_section ();                    \
  992. +       else                                \
  993. +     data_section ();                        \
  994. +     }                                    \
  995. +   else if (TREE_CODE (DECL) == VAR_DECL)                \
  996. +     {                                    \
  997. +       if ((flag_pic && flag_pic < 3 && RELOC)                \
  998. +       || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL))        \
  999. +     data_section ();                        \
  1000. +       else                                \
  1001. +     readonly_data_section ();                    \
  1002. +     }                                    \
  1003. +   else                                    \
  1004. +     readonly_data_section ();                        \
  1005. + }
  1006. + #if not_yet_working
  1007. + /* starting support for amiga specific keywords
  1008. +  * --------------------------------------------
  1009. +  */
  1010. + /* validate attributes that don't take a parameter. Currently we support
  1011. +  * __attribute__ (saveds) and __attribute__ (interrupt)
  1012. +  */
  1013. + #define HANDLE_ATTRIBUTE0(attr) \
  1014. +   (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
  1015. + /* (c-common.c)
  1016. +  * install additional attributes
  1017. +  */
  1018. + #define HANDLE_EXTRA_ATTRIBUTES(a)                         \
  1019. +   if (TREE_VALUE (a) != 0                            \
  1020. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  1021. +       && TREE_VALUE (a) == get_identifier ("saveds"))                \
  1022. +     {                                        \
  1023. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  1024. +         {                                    \
  1025. +           warning_with_decl (decl,                        \
  1026. +               "saveds attribute specified for non-function `%s'");        \
  1027. +       return;                                \
  1028. +         }                                    \
  1029. +                                               \
  1030. +       attr_do_saveds (DECL_NAME (decl));                    \
  1031. +     }                                        \
  1032. +   else if (TREE_VALUE (a) != 0                            \
  1033. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  1034. +       && TREE_VALUE (a) == get_identifier ("interrupt"))            \
  1035. +     {                                        \
  1036. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  1037. +         {                                    \
  1038. +           warning_with_decl (decl,                        \
  1039. +               "saveds attribute specified for non-function `%s'");        \
  1040. +       return;                                \
  1041. +         }                                    \
  1042. +                                               \
  1043. +       attr_do_interrupt (DECL_NAME (decl));                    \
  1044. +     }                                        \
  1045. + #define PROLOGUE_EXTRA_SAVE(mask)                        \
  1046. +   { extern char *current_function_name;                        \
  1047. +     /* saveds makes the function preserve d1/a0/a1 as well */            \
  1048. +     if (attr_does_saveds (current_function_name))                \
  1049. +       mask |= 0x40c0; }                                \
  1050. + #define EPILOGUE_EXTRA_RESTORE(mask, nregs)                    \
  1051. +   { extern char *current_function_name;                        \
  1052. +     /* restore those extra registers */                        \
  1053. +     if (attr_does_saveds (current_function_name))                \
  1054. +       {                                        \
  1055. +     mask |= 0x0302;                                \
  1056. +     nregs += 3;                                \
  1057. +       } }                                    \
  1058. + #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream)                    \
  1059. +   { extern char *current_function_name;                        \
  1060. +     /* PLEASE Help! how is this done cleaner?? */                \
  1061. +     if (attr_does_saveds (current_function_name))                \
  1062. +       {                                        \
  1063. +     fprintf (stderr,                             \
  1064. +          "warning: couldn't cleanup `saveds'-stack in `%s'.\n");    \
  1065. +     fprintf (stderr,                            \
  1066. +          "         this is only ok, if the function never returns!\n");    \
  1067. +       }    }                                    \
  1068. +         
  1069. + #define EPILOGUE_EXTRA_TEST(stream)                        \
  1070. +   { extern char *current_function_name;                        \
  1071. +     /* with the interrupt-attribute, we have to set the cc before rts */    \
  1072. +     if (attr_does_interrupt (current_function_name))                \
  1073. +       asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); }            \
  1074. + #endif
  1075. diff -2rcN gcc-2.6.1/config/m68k/m68k.c gcc-2.6.1-amiga/config/m68k/m68k.c
  1076. *** gcc-2.6.1/config/m68k/m68k.c    Sun Apr 17 00:16:27 1994
  1077. --- gcc-2.6.1-amiga/config/m68k/m68k.c    Fri Nov  4 11:02:40 1994
  1078. ***************
  1079. *** 51,56 ****
  1080.   static rtx find_addr_reg ();
  1081.   rtx legitimize_pic_address ();
  1082.   /* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the 
  1083.      function at any time during the compilation process.  In the future 
  1084. --- 51,56 ----
  1085.   static rtx find_addr_reg ();
  1086.   rtx legitimize_pic_address ();
  1087. !  /* Phil.B 27-Oct-94 follows Jeffrey A Law patch (law@snake.cs.utah.edu) from 28-Feb-94 */
  1088. ! #if 0
  1089.   /* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the 
  1090.      function at any time during the compilation process.  In the future 
  1091. ***************
  1092. *** 62,69 ****
  1093.   finalize_pic ()
  1094.   {
  1095. !   if (flag_pic && current_function_uses_pic_offset_table)
  1096.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  1097.   }
  1098.   
  1099.   /* This function generates the assembly code for function entry.
  1100. --- 62,69 ----
  1101.   finalize_pic ()
  1102.   {
  1103. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1104.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  1105.   }
  1106. ! #endif
  1107.   
  1108.   /* This function generates the assembly code for function entry.
  1109. ***************
  1110. *** 142,146 ****
  1111.       {
  1112.         /* Adding negative number is faster on the 68040.  */
  1113. !       if (fsize + 4 < 0x8000)
  1114.       {
  1115.       /* asm_fprintf() cannot handle %. */
  1116. --- 142,147 ----
  1117.       {
  1118.         /* Adding negative number is faster on the 68040.  */
  1119. !         if (fsize + 4 < 0x8000)
  1120.       {
  1121.       /* asm_fprintf() cannot handle %. */
  1122. ***************
  1123. *** 197,200 ****
  1124. --- 198,204 ----
  1125.         num_saved_regs--;
  1126.       }
  1127. + #ifdef PROLOGUE_EXTRA_SAVE
  1128. +   PROLOGUE_EXTRA_SAVE (mask);
  1129. + #endif
  1130.   
  1131.   #if NEED_PROBE
  1132. ***************
  1133. *** 230,234 ****
  1134.   #endif
  1135.       }
  1136. !   if (flag_pic && current_function_uses_pic_offset_table)
  1137.       {
  1138.   #ifdef MOTOROLA
  1139. --- 234,238 ----
  1140.   #endif
  1141.       }
  1142. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1143.       {
  1144.   #ifdef MOTOROLA
  1145. ***************
  1146. *** 295,298 ****
  1147. --- 299,305 ----
  1148.        about which function the pc is in at this address.  */
  1149.         asm_fprintf (stream, "\tnop\n");
  1150. + #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
  1151. +       EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
  1152. + #endif
  1153.         return;
  1154.       }
  1155. ***************
  1156. *** 325,328 ****
  1157. --- 332,338 ----
  1158.       mask |= 1 << regno;
  1159.         }
  1160. + #ifdef EPILOGUE_EXTRA_RESTORE
  1161. +   EPILOGUE_EXTRA_RESTORE(mask, nregs);
  1162. + #endif
  1163.     offset = foffset + nregs * 4;
  1164.     if (offset + fsize >= 0x8000
  1165. ***************
  1166. *** 529,532 ****
  1167. --- 539,545 ----
  1168.       }
  1169.       }
  1170. + #ifdef EPILOGUE_EXTRA_TEST
  1171. +   EPILOGUE_EXTRA_TEST(stream);
  1172. + #endif
  1173.     if (current_function_pops_args)
  1174.       asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
  1175. ***************
  1176. *** 819,831 ****
  1177.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1178.       {
  1179.         if (reg == 0)
  1180.       abort ();
  1181.   
  1182. !       pic_ref = gen_rtx (MEM, Pmode,
  1183. !              gen_rtx (PLUS, Pmode,
  1184. !                   pic_offset_table_rtx, orig));
  1185.         current_function_uses_pic_offset_table = 1;
  1186.         RTX_UNCHANGING_P (pic_ref) = 1;
  1187.         emit_move_insn (reg, pic_ref);
  1188.         return reg;
  1189.       }
  1190. --- 832,860 ----
  1191.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1192.       {
  1193. + #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1194. +   if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  1195. +     return orig;
  1196. + #endif
  1197.         if (reg == 0)
  1198.       abort ();
  1199.   
  1200. !       if (flag_pic >= 3)
  1201. !     pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  1202. !       else
  1203. !         pic_ref = gen_rtx (MEM, Pmode,
  1204. !                gen_rtx (PLUS, Pmode,
  1205. !                     pic_offset_table_rtx, orig));
  1206. !  
  1207. !       /* We could have a function which didn't use the GOT after RTL
  1208. !      generation, but because of some action from a later pass
  1209. !      (reload in particular) uses the GOT now.  So emit both a USE
  1210. !      insn and set regs_ever_live for the GOT register.  */
  1211.         current_function_uses_pic_offset_table = 1;
  1212. +       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  1213. +       regs_ever_live[REGNO (pic_offset_table_rtx)] = 1;
  1214.         RTX_UNCHANGING_P (pic_ref) = 1;
  1215.         emit_move_insn (reg, pic_ref);
  1216.         return reg;
  1217.       }
  1218. ***************
  1219. *** 856,859 ****
  1220. --- 885,889 ----
  1221.         /* Likewise, should we set special REG_NOTEs here?  */
  1222.       }
  1223.     return pic_ref;
  1224.   }
  1225. ***************
  1226. *** 2168,2171 ****
  1227. --- 2198,2205 ----
  1228.               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  1229.                 fprintf (file, ":l");
  1230. +             if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  1231. +               fprintf (file, ":W");
  1232. +             if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
  1233. +               fprintf (file, ":L");
  1234.             }
  1235.           if (addr != 0 && ireg != 0)
  1236. diff -2rcN gcc-2.6.1/config/m68k/m68k.h gcc-2.6.1-amiga/config/m68k/m68k.h
  1237. *** gcc-2.6.1/config/m68k/m68k.h    Sun Apr 10 12:10:37 1994
  1238. --- gcc-2.6.1-amiga/config/m68k/m68k.h    Fri Nov  4 11:02:41 1994
  1239. ***************
  1240. *** 262,269 ****
  1241. --- 262,271 ----
  1242.   #define PIC_OFFSET_TABLE_REGNUM 13
  1243.   
  1244. + #ifdef 0
  1245.   /* Used to output a (use pic_offset_table_rtx) so that we 
  1246.      always save/restore a5 in functions that use PIC relocation
  1247.      at *any* time during the compilation process. */
  1248.   #define FINALIZE_PIC finalize_pic()
  1249. + #endif
  1250.   
  1251.   #ifndef SUPPORT_SUN_FPA
  1252. ***************
  1253. *** 354,360 ****
  1254.   
  1255.   #define CONDITIONAL_REGISTER_USAGE \
  1256. ! {                                               \
  1257. !   if (flag_pic)                                 \
  1258. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  1259.   }
  1260.   
  1261. --- 356,365 ----
  1262.   
  1263.   #define CONDITIONAL_REGISTER_USAGE \
  1264. ! {                                                \
  1265. !   if (flag_pic)                                  \
  1266. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;     \
  1267. !   /* prevent saving/restoring of the base reg */ \
  1268. !   if (flag_pic == 3)                 \
  1269. !     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  1270.   }
  1271.   
  1272. diff -2rcN gcc-2.6.1/config/m68k/m68k.md gcc-2.6.1-amiga/config/m68k/m68k.md
  1273. *** gcc-2.6.1/config/m68k/m68k.md    Thu Sep  8 07:35:41 1994
  1274. --- gcc-2.6.1-amiga/config/m68k/m68k.md    Fri Nov  4 11:02:42 1994
  1275. ***************
  1276. *** 713,723 ****
  1277.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1278.       {
  1279. !       /* The source is an address which requires PIC relocation.  
  1280. !          Call legitimize_pic_address with the source, mode, and a relocation
  1281. !          register (a new pseudo, or the final destination if reload_in_progress
  1282. !          is set).   Then fall through normally */
  1283. !       extern rtx legitimize_pic_address();
  1284. !       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1285. !       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1286.       }
  1287.   }")
  1288. --- 713,728 ----
  1289.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1290.       {
  1291. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1292. !       if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  1293. ! #endif
  1294. !       {
  1295. !         /* The source is an address which requires PIC relocation.  
  1296. !            Call legitimize_pic_address with the source, mode, and a relocation
  1297. !            register (a new pseudo, or the final destination if reload_in_progress
  1298. !            is set).   Then fall through normally */
  1299. !         extern rtx legitimize_pic_address();
  1300. !         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1301. !         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1302. !       }
  1303.       }
  1304.   }")
  1305. ***************
  1306. *** 1857,1862 ****
  1307.         /* These insns can result from reloads to access
  1308.        stack slots over 64k from the frame pointer.  */
  1309. !       if (GET_CODE (operands[2]) == CONST_INT
  1310. !       && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
  1311.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1312.   #ifdef SGS
  1313. --- 1862,1868 ----
  1314.         /* These insns can result from reloads to access
  1315.        stack slots over 64k from the frame pointer.  */
  1316. !       if (((GET_CODE (operands[2]) == CONST_INT
  1317. !        && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
  1318. !       || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
  1319.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1320.   #ifdef SGS
  1321. ***************
  1322. *** 4770,4774 ****
  1323.     "
  1324.   {
  1325. !   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1326.   #ifdef MOTOROLA
  1327.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1328. --- 4776,4780 ----
  1329.     "
  1330.   {
  1331. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1332.   #ifdef MOTOROLA
  1333.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1334. ***************
  1335. *** 4785,4789 ****
  1336.     ;; Operand 1 not really used on the m68000.
  1337.   
  1338. !   "! flag_pic"
  1339.     "*
  1340.   #ifdef MOTOROLA
  1341. --- 4791,4795 ----
  1342.     ;; Operand 1 not really used on the m68000.
  1343.   
  1344. !   "(! flag_pic || flag_pic >= 3)"
  1345.     "*
  1346.   #ifdef MOTOROLA
  1347. ***************
  1348. *** 4805,4809 ****
  1349.     ;; Operand 1 not really used on the m68000.
  1350.   
  1351. !   "flag_pic"
  1352.     "*
  1353.   #ifdef MOTOROLA
  1354. --- 4811,4815 ----
  1355.     ;; Operand 1 not really used on the m68000.
  1356.   
  1357. !   "(flag_pic && flag_pic < 3)"
  1358.     "*
  1359.   #ifdef MOTOROLA
  1360. ***************
  1361. *** 4830,4834 ****
  1362.     "
  1363.   {
  1364. !   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1365.   #ifdef MOTOROLA
  1366.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1367. --- 4836,4840 ----
  1368.     "
  1369.   {
  1370. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1371.   #ifdef MOTOROLA
  1372.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1373. ***************
  1374. *** 4845,4849 ****
  1375.             (match_operand:SI 2 "general_operand" "g")))]
  1376.     ;; Operand 2 not really used on the m68000.
  1377. !   "! flag_pic"
  1378.     "*
  1379.   #ifdef MOTOROLA
  1380. --- 4851,4855 ----
  1381.             (match_operand:SI 2 "general_operand" "g")))]
  1382.     ;; Operand 2 not really used on the m68000.
  1383. !   "(! flag_pic || flag_pic >= 3)"
  1384.     "*
  1385.   #ifdef MOTOROLA
  1386. ***************
  1387. *** 4865,4869 ****
  1388.             (match_operand:SI 2 "general_operand" "g")))]
  1389.     ;; Operand 2 not really used on the m68000.
  1390. !   "flag_pic"
  1391.     "*
  1392.   #ifdef MOTOROLA
  1393. --- 4871,4875 ----
  1394.             (match_operand:SI 2 "general_operand" "g")))]
  1395.     ;; Operand 2 not really used on the m68000.
  1396. !   "(flag_pic && flag_pic < 3)"
  1397.     "*
  1398.   #ifdef MOTOROLA
  1399. diff -2rcN gcc-2.6.1/config/m68k/t-amigados gcc-2.6.1-amiga/config/m68k/t-amigados
  1400. *** gcc-2.6.1/config/m68k/t-amigados
  1401. --- gcc-2.6.1-amiga/config/m68k/t-amigados    Fri Nov  4 11:02:42 1994
  1402. ***************
  1403. *** 0 ****
  1404. --- 1,187 ----
  1405. + # Makefile fragment for amigados target.
  1406. + # We generate two additional things:
  1407. + #
  1408. + # libb/libgcc.a
  1409. + #    A base relative version of libgcc.a which is used when compiling and
  1410. + #    linking with the '-resident' option.
  1411. + #
  1412. + # xgccv
  1413. + #    A forking gcc instead of one calling ssytem(). This makes it less
  1414. + #    system conformant (can't ^C it when started from make), while providing
  1415. + #    increased functionality (-pipe option).
  1416. + # Use the vfork'ing version of gcc by default, so that the -pipe option can
  1417. + # get tested.  To use the regular version just do "make XGCC=gcc".  Note that
  1418. + # PIPE is defined in x-amigados, so if we are doing a native build, it will
  1419. + # be defined.  It can be overridden with "make PIPE=".
  1420. + XGCC = xgccv $(PIPE)
  1421. + GCC_FOR_TARGET = ./$(XGCC) -B./
  1422. + # Build residentable versions of the gcc executables by default.  Use
  1423. + # "make RESIDENT=" to build non-residentable versions.
  1424. + # Note:  This failed during bootstrapping of 2.5.5.
  1425. + #RESIDENT = -resident
  1426. + # The standard additional target flags for the compiler.
  1427. + T_CFLAGS = $(RESIDENT)
  1428. + # Allow the user to override the default target optimizations with gcc, or if
  1429. + # the target compiler is not gcc and doesn't understand -O<N>.
  1430. + T_OPTIMISE = -O2
  1431. + # Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
  1432. + # own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
  1433. + # are in /gnu/include and system specific headers are in /gnu/os-include.
  1434. + # Use these paths for fixincludes.
  1435. + SYSTEM_HEADER_DIR = /gnu/include
  1436. + OTHER_FIXINCLUDES_DIRS = /gnu/os-include
  1437. + # We don't need a libgcc1, it's all in ixemul.library
  1438. + LIBGCC1 = libgcc1.null
  1439. + # Flags to use when compiling the normal version of libgcc.a.
  1440. + # Don't compile with debugging, as long as there is no debugger.
  1441. + # Explicitly leave out the -resident compilation flag and don't use T_CFLAGS.
  1442. + LIBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1443. +           $(CROSS_GCC_CFLAGS)
  1444. + # Flags to use when compiling the base relative version of libgcc.a.
  1445. + # Don't compile with debugging, as long as there is no debugger.
  1446. + # Explicitly force -resident in the compilation flags and don't use T_CFLAGS.
  1447. + LIBBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1448. +           $(CROSS_GCC_CFLAGS) -resident
  1449. + # Build the base relative library.
  1450. + # It is later copied into /gnu/lib/gcc-lib/amigados/<version>/libb/libgcc.a, whereas
  1451. + # libgcc.a is copied into /gnu/lib/gcc-lib/amigados/<version>/libgcc.a.
  1452. + # It doesn't work very well to define one of the EXTRA_* macros to contain
  1453. + # libb/libgcc.a, particularly for doing "make stageN" or "make install".
  1454. + GCC_PARTS=$(GCC_PASSES) libgcc.a libb/libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  1455. + # Add install_libbgcc to normal define of INSTALL_LIBGCC.  Let install-gccv
  1456. + # hitch a ride on here as well.
  1457. + INSTALL_LIBGCC = install-libgcc install-libbgcc install-gccv
  1458. + # This includes the knowledge that target amigados doesn't need libgcc1.a
  1459. + libb/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
  1460. +    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  1461. + # Actually build it in tmplibbgcc.a, then rename at end,
  1462. + # so that libb/libgcc.a itself remains nonexistent if compilation is aborted.
  1463. +     -rm -f tmplibbgcc.a
  1464. + # -e causes any failing command to make this rule fail.
  1465. + # -e doesn't work in certain shells, so we test $$? as well.
  1466. +     set -e; \
  1467. +     for name in $(LIB2FUNCS); \
  1468. +     do \
  1469. +       echo $${name}; \
  1470. +       $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1471. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1472. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1473. +       $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1474. +       rm -f $${name}.o; \
  1475. +     done
  1476. + # Some shells crash when a loop has no items.
  1477. + # So make sure there is always at least one--`..'.
  1478. + # Then ignore it.
  1479. + # We don't use -e here because there are if statements
  1480. + # that should not make the command give up when the if condition is false.
  1481. + # Instead, we test for failure after each command where it matters.
  1482. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1483. +     do \
  1484. +       if [ x$${file} != x.. ]; then \
  1485. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1486. +         echo $${name}; \
  1487. +         if [ $${name}.asm = $${file} ]; then \
  1488. +           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  1489. +         else true; fi; \
  1490. +         $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  1491. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1492. +         $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1493. +         rm -f $${name}.[so]; \
  1494. +       else true; \
  1495. +       fi; \
  1496. +     done
  1497. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbgcc.a; else true; fi
  1498. +     -if [ -d libb ] ; then true ; else mkdir libb ; fi
  1499. +     mv tmplibbgcc.a libb/libgcc.a
  1500. + install-libbgcc: libb/libgcc.a install-dir
  1501. +     -if [ -d $(libsubdir)/libb ] ; then true ; else mkdir $(libsubdir)/libb ; fi
  1502. +     -if [ -f libb/libgcc.a ] ; then \
  1503. +       rm -f $(libsubdir)/libb/libgcc.a; \
  1504. +       $(INSTALL_DATA) libb/libgcc.a $(libsubdir)/libb/libgcc.a; \
  1505. +       if $(RANLIB_TEST) ; then \
  1506. +         (cd $(libsubdir)/libb; $(RANLIB) libgcc.a); else true; fi; \
  1507. +       chmod a-x $(libsubdir)/libb/libgcc.a; \
  1508. +     else true; fi
  1509. +     
  1510. + # The default gcc (xgcc) is built without -DAMIGADOS_FORK_GCC. This gcc (xgccv)
  1511. + # is built with AMIGADOS_FORK_GCC defined, so that it can use '-pipe'.  We
  1512. + # don't want to define EXTRA_PASSES to xgccv because that will cause xgccv
  1513. + # to be installed in $(libsubdir), so instead we use the default GCC_PASSES
  1514. + # and add xgccv to it.
  1515. + GCC_PASSES = xgcc xgccv cc1 cpp $(EXTRA_PASSES)
  1516. + xgccv: xgccv.o version.o $(LIBDEPS)
  1517. +     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgccv xgccv.o version.o $(LIBS)
  1518. + xgccv.o: gcc.c $(CONFIG_H) config.status
  1519. +     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1520. +   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  1521. +   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  1522. +   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  1523. +   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  1524. +   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  1525. +   -DAMIGADOS_FORK_GCC \
  1526. +   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o xgccv.o
  1527. + install-gccv: xgccv
  1528. +     rm -f $(bindir)/gccv
  1529. +     $(INSTALL_PROGRAM) xgccv $(bindir)/gccv
  1530. + # When making one of the stage<N> dirs, we need to make a libb subdir for
  1531. + # it, and copy libbgcc.a there as libgcc.a.
  1532. + EXTRA_STAGE1_TARGETS = stage1-libb
  1533. + EXTRA_STAGE2_TARGETS = stage2-libb
  1534. + EXTRA_STAGE3_TARGETS = stage3-libb
  1535. + EXTRA_STAGE4_TARGETS = stage4-libb
  1536. + stage1-libb:
  1537. +     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  1538. +     -if [ -d stage1/libb ] ; then true ; else mkdir stage1/libb ; fi
  1539. +     -cp libb/libgcc.a stage1/libb/libgcc.a
  1540. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libgcc.a; else true; fi
  1541. + stage2-libb:
  1542. +     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  1543. +     -if [ -d stage2/libb ] ; then true ; else mkdir stage2/libb ; fi
  1544. +     -cp libb/libgcc.a stage2/libb/libgcc.a
  1545. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libgcc.a; else true; fi
  1546. + stage3-libb:
  1547. +     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  1548. +     -if [ -d stage3/libb ] ; then true ; else mkdir stage3/libb ; fi
  1549. +     -cp libb/libgcc.a stage3/libb/libgcc.a
  1550. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libgcc.a; else true; fi
  1551. + stage4-libb:
  1552. +     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  1553. +     -if [ -d stage4/libb ] ; then true ; else mkdir stage4/libb ; fi
  1554. +     -cp libb/libgcc.a stage4/libb/libgcc.a
  1555. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libgcc.a; else true; fi
  1556. diff -2rcN gcc-2.6.1/config/m68k/x-amigados gcc-2.6.1-amiga/config/m68k/x-amigados
  1557. *** gcc-2.6.1/config/m68k/x-amigados
  1558. --- gcc-2.6.1-amiga/config/m68k/x-amigados    Fri Nov  4 11:02:42 1994
  1559. ***************
  1560. *** 0 ****
  1561. --- 1,44 ----
  1562. + # Note: It doesn't do any good to try to define prefix or local_prefix
  1563. + # in the host overrides because configure will just change them back.
  1564. + # You either have to give an appropriate option to configure or live with
  1565. + # an Amiga specific patch to configure.  See the note in configure.  -fnf
  1566. + # Building under amigados almost certainly requires an already working gcc.
  1567. + # Use gccv, which is a gcc compiled with AMIGADOS_FORK_GCC so "-pipe" will
  1568. + # work and get exercised.  To bootstrap with the regular gcc just do
  1569. + # "make CC=gcc".  To bootstrap without "-pipe" do "make PIPE=".
  1570. + CC = gccv $(PIPE)
  1571. + # Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with
  1572. + # it. (fnf)
  1573. + #PIPE = -pipe
  1574. + # Allow the user to override the default host optimization with gcc, or if the
  1575. + # host compiler is not gcc and doesn't understand -O<N>.
  1576. + X_OPTIMIZE = -O2
  1577. + # The standard additional host flags for the compiler.
  1578. + X_CFLAGS = $(X_OPTIMIZE)
  1579. + # Man pages get a wierd suffix...
  1580. + manext = .0
  1581. + # We really shouldn't specify CFLAGS from here, but there's no other way
  1582. + # to get rid of the `-g' indoctrinated by Makefile.in.  Note this becomes
  1583. + # part of both the host compilation CFLAGS and the target compilation
  1584. + # CFLAGS.
  1585. + CFLAGS =
  1586. + # Ranlib does exist, but may not be in a path where the default RANLIB_TEST
  1587. + # expects it, so just force it to true.
  1588. + RANLIB_TEST = true
  1589. + # My current version of ln doesn't work, so use cp instead.  -fnf
  1590. + HARDLINK = cp
  1591. diff -2rcN gcc-2.6.1/config/m68k/xm-amigados.h gcc-2.6.1-amiga/config/m68k/xm-amigados.h
  1592. *** gcc-2.6.1/config/m68k/xm-amigados.h
  1593. --- gcc-2.6.1-amiga/config/m68k/xm-amigados.h    Fri Nov  4 11:02:43 1994
  1594. ***************
  1595. *** 0 ****
  1596. --- 1,218 ----
  1597. + /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
  1598. +    Copyright (C) 1992 Free Software Foundation, Inc.
  1599. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  1600. + This file is part of GNU CC.
  1601. + GNU CC is free software; you can redistribute it and/or modify
  1602. + it under the terms of the GNU General Public License as published by
  1603. + the Free Software Foundation; either version 2, or (at your option)
  1604. + any later version.
  1605. + GNU CC is distributed in the hope that it will be useful,
  1606. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1607. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1608. + GNU General Public License for more details.
  1609. + You should have received a copy of the GNU General Public License
  1610. + along with GNU CC; see the file COPYING.  If not, write to
  1611. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1612. + /* first include the generic header, then modify some parts.. */
  1613. + #include "m68k/xm-m68k.h"
  1614. + /* Amiga specific headers, such as from the Native Developer Update kits,
  1615. +    go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
  1616. +    Unix "/usr/include".  All other include paths are set in Makefile. */
  1617. + #define SYSTEM_INCLUDE_DIR    "/gnu/os-include"
  1618. + #define STANDARD_INCLUDE_DIR    "/gnu/include"
  1619. + /* Fork one piped subcommand.  SEARCH_FLAG is the system call to use
  1620. +    (either execv or execvp).  ARGV is the arg vector to use.
  1621. +    NOT_LAST is nonzero if this is not the last subcommand
  1622. +    (i.e. its output should be piped to the next one.)  */
  1623. + #ifndef AMIGADOS_FORK_GCC
  1624. + /* This version uses a more or less amigados-conformant way of running a
  1625. +    program (in the context of the parent). If you want to use -pipe however,
  1626. +    you'll have to use the vfork() version afterwards.
  1627. +    Phil.B: 29-May-94 quick hack (number 20 added to length) because xgcc
  1628. +    doesn't work.
  1629. +  */
  1630. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1631. + ({char *_argline;                        \
  1632. +   int _arglinelength, _i;                    \
  1633. +                                 \
  1634. +   for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i)        \
  1635. +     _arglinelength += strlen(ARGV[_i]) + 1;            \
  1636. +                                 \
  1637. +   _arglinelength += strlen(PROGRAM) + 20 + 1;            \
  1638. +                                 \
  1639. +   if (!(_argline = (char *)alloca(_arglinelength)))         \
  1640. +     pfatal_with_name ("alloca");                \
  1641. +                                 \
  1642. +   strcpy(_argline, PROGRAM);                    \
  1643. +   for (_i = 1; ARGV[_i]; ++_i)                     \
  1644. +     {                                \
  1645. +       strcat(_argline, " ");                    \
  1646. +       strcat(_argline, ARGV[_i]);                \
  1647. +     }                                \
  1648. +                                 \
  1649. +   ssystem(_argline); })                        \
  1650. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1651. +   ({ STATUS = COMMAND.pid; })
  1652. + #else
  1653. + /* the vfork() version. This one has the drawback, that gcc is not 
  1654. +    interruptible when started from make, since ixemul.library doesn't yet
  1655. +    propagate ^C to subprocesses. */
  1656. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1657. + ({int (*_func)() = (SEARCH_FLAG ? execv : execvp);            \
  1658. +   int _pid;                                \
  1659. +   int _pdes[2];                                \
  1660. +   int _input_desc = last_pipe_input;                    \
  1661. +   int _output_desc = STDOUT_FILE_NO;                    \
  1662. +   int _retries, _sleep_interval, _result;                \
  1663. +                                     \
  1664. +   /* If this isn't the last process, make a pipe for its output,    \
  1665. +      and record it as waiting to be the input to the next process.  */    \
  1666. +                                     \
  1667. +   if (NOT_LAST)                                \
  1668. +     {                                    \
  1669. +       if (pipe (_pdes) < 0)                        \
  1670. +     pfatal_with_name ("pipe");                    \
  1671. +       _output_desc = _pdes[WRITE_PORT];                    \
  1672. +       last_pipe_input = _pdes[READ_PORT];                \
  1673. +     }                                    \
  1674. +   else                                    \
  1675. +     last_pipe_input = STDIN_FILE_NO;                    \
  1676. +                                     \
  1677. +   /* Fork a subprocess; wait and retry if it fails.  */            \
  1678. +   _sleep_interval = 1;                            \
  1679. +   for (_retries = 0; _retries < 4; _retries++)                \
  1680. +     {                                    \
  1681. +       _pid = vfork ();                            \
  1682. +       if (_pid >= 0)                            \
  1683. +     break;                                \
  1684. +       sleep (_sleep_interval);                        \
  1685. +       _sleep_interval *= 2;                        \
  1686. +     }                                    \
  1687. +                                     \
  1688. +   switch (_pid)                                \
  1689. +     {                                    \
  1690. +     case -1:                                \
  1691. +       pfatal_with_name ("vfork");                    \
  1692. +       /* NOTREACHED */                            \
  1693. +       _result = 0;                            \
  1694. +       break;                                \
  1695. +                                     \
  1696. +     case 0: /* child */                            \
  1697. +       /* Move the input and output pipes into place, if nec.  */    \
  1698. +       if (_input_desc != STDIN_FILE_NO)                    \
  1699. +     {                                \
  1700. +       close (STDIN_FILE_NO);                    \
  1701. +       dup (_input_desc);                        \
  1702. +       close (_input_desc);                        \
  1703. +     }                                \
  1704. +       if (_output_desc != STDOUT_FILE_NO)                \
  1705. +     {                                \
  1706. +       close (STDOUT_FILE_NO);                    \
  1707. +       dup (_output_desc);                        \
  1708. +       close (_output_desc);                        \
  1709. +     }                                \
  1710. +                                     \
  1711. +       /* Close the parent's descs that aren't wanted here.  */        \
  1712. +       if (last_pipe_input != STDIN_FILE_NO)                \
  1713. +     close (last_pipe_input);                    \
  1714. +                                     \
  1715. +       /* Exec the program.  */                        \
  1716. +       (*_func) (PROGRAM, ARGV);                        \
  1717. +       perror_exec (PROGRAM);                        \
  1718. +       exit (-1);                            \
  1719. +       /* NOTREACHED */                            \
  1720. +       _result = 0;                            \
  1721. +       break;                                \
  1722. +                                     \
  1723. +     default:                                \
  1724. +       /* In the parent, after forking.                    \
  1725. +      Close the descriptors that we made for this child.  */        \
  1726. +       if (_input_desc != STDIN_FILE_NO)                    \
  1727. +     close (_input_desc);                        \
  1728. +       if (_output_desc != STDOUT_FILE_NO)                \
  1729. +     close (_output_desc);                        \
  1730. +                                     \
  1731. +       /* Return child's process number.  */                \
  1732. +       _result = _pid;                            \
  1733. +       break;                                \
  1734. +     }                                     \
  1735. + _result; })                                \
  1736. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1737. +   ({ wait (& STATUS); })
  1738. + #endif /* AMIGADOS_FORK_GCC */
  1739. + /* the following macros are stolen more or less from xm-vms.h ... */
  1740. + /* This macro is used to help compare filenames in cp-lex.c.
  1741. +    We also need to make sure that the names are all lower case, because
  1742. +    we must be able to compare filenames to determine if a file implements
  1743. +    a class.  */
  1744. + #define FILE_NAME_NONDIRECTORY(C)                \
  1745. + ({                                \
  1746. +    extern char *rindex();                    \
  1747. +    char * pnt_ = (C), * pnt1_;                    \
  1748. +    pnt1_ = pnt_ - 1;                        \
  1749. +    while (*++pnt1_)                        \
  1750. +      if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;    \
  1751. +    pnt1_ = rindex (pnt_, '/');                     \
  1752. +    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);        \
  1753. +    (pnt1_ == 0 ? pnt_ : pnt1_ + 1);                \
  1754. +  })
  1755. + /* Macro to generate the name of the cross reference file.  The standard
  1756. +    one does not work, since it was written assuming that the conventions
  1757. +    of a unix style filesystem will work on the host system.
  1758. +  
  1759. +    Contrary to VMS, I'm using the original unix filename, there's no reason
  1760. +    not to use this under AmigaDOS. */
  1761. + #define XREF_FILE_NAME(BUFF, NAME)    \
  1762. +   s = FILE_NAME_NONDIRECTORY (NAME);            \
  1763. +   if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME);    \
  1764. +   else {                        \
  1765. +     unsigned char ch = *s; /* could be Latin1 char.. */    \
  1766. +     /* temporary: cut the filename from the directory */\
  1767. +     *s = 0;                        \
  1768. +     sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1);    \
  1769. +     /* and restore the filename */            \
  1770. +     *s = ch;                        \
  1771. +   }                            \
  1772. + /* Macro that is used in cp-xref.c to determine whether a file name is
  1773. +    absolute or not.
  1774. +    This checks for both, '/' as first character, since we're running under
  1775. +    ixemul.library which provides for this unix'ism, and for the usual 
  1776. +    logical-terminator, ':', somewhere in the filename. */
  1777. + #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
  1778. + /* the colon conflicts with the name space of logicals */
  1779. + #define PATH_SEPARATOR ','
  1780. + /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
  1781. +    hacks. It's actually the inverse case as on Unix. rename(2) was always
  1782. +    there, link(2) is new with OS 2.0 */
  1783. + #define HAVE_rename 1
  1784. diff -2rcN gcc-2.6.1/configure gcc-2.6.1-amiga/configure
  1785. *** gcc-2.6.1/configure    Thu Oct 27 17:15:04 1994
  1786. --- gcc-2.6.1-amiga/configure    Fri Nov  4 11:02:43 1994
  1787. ***************
  1788. *** 5,8 ****
  1789. --- 5,12 ----
  1790.   #This file is part of GNU CC.
  1791.   
  1792. + # AmigaDOS Notes:  Where "echo" can be invoked with a first arg that
  1793. + # starts with '-', run the external echo instead, since the pdksh builtin
  1794. + # version botches this case.
  1795.   #GNU CC is free software; you can redistribute it and/or modify
  1796.   #it under the terms of the GNU General Public License as published by
  1797. ***************
  1798. *** 47,52 ****
  1799.   # Default --srcdir to the directory where the script is found, 
  1800.   # if a directory was specified.
  1801. ! # The second sed call is to convert `.//configure' to `./configure'.
  1802. ! srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  1803.   if [ x$srcdir = x$0 ]
  1804.   then
  1805. --- 51,58 ----
  1806.   # Default --srcdir to the directory where the script is found, 
  1807.   # if a directory was specified.
  1808. ! # The first sed call works around a bug in the AmigaDOS port of sksh, where
  1809. ! # $0 has a trailing slash appended to it.  It is a NOP for other systems.
  1810. ! # The third sed call is to convert `.//configure' to `./configure'.
  1811. ! srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  1812.   if [ x$srcdir = x$0 ]
  1813.   then
  1814. ***************
  1815. *** 56,69 ****
  1816.   host=
  1817.   
  1818. ! # Default prefix to /usr/local.
  1819. ! prefix=/usr/local
  1820.   
  1821. ! # local_prefix specifies where to find the directory /usr/local/include
  1822.   # We don't use $(prefix) for this
  1823. ! # because we always want GCC to search /usr/local/include
  1824. ! # even if GCC is installed somewhere other than /usr/local.
  1825.   # Think THREE TIMES before specifying any other value for this!
  1826.   # DO NOT make this use $prefix!
  1827. ! local_prefix=/usr/local
  1828.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1829.   exec_prefix='$(prefix)'
  1830. --- 62,85 ----
  1831.   host=
  1832.   
  1833. ! # Note:  For AmigaDOS we want this to default to /gnu unless we specify
  1834. ! # otherwise to configure.  We also don't want to have to remember to always
  1835. ! # configure with "--prefix=/gnu".  Changing it in Makefile.in or in
  1836. ! # config/m68k/x-amigados is ineffective since configure will always change
  1837. ! # it back in the final generated Makefile, so we have to go to the root of
  1838. ! # the problem, which is here.  There should be a way to do this in the
  1839. ! # individual machine configuration files!  -fnf
  1840. ! # here.  -fnf
  1841. ! # Default prefix to "/gnu".
  1842. ! prefix=/gnu
  1843.   
  1844. ! # local_prefix specifies where to find the directory /gnu/local/include
  1845.   # We don't use $(prefix) for this
  1846. ! # because we always want GCC to search /gnu/local/include
  1847. ! # even if GCC is installed somewhere other than /gnu/local.
  1848.   # Think THREE TIMES before specifying any other value for this!
  1849.   # DO NOT make this use $prefix!
  1850. ! # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  1851. ! # NoteII:We don't want to have yet-another-assign so we use /gnu/local
  1852. ! local_prefix=/gnu/local
  1853.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1854.   exec_prefix='$(prefix)'
  1855. ***************
  1856. *** 73,78 ****
  1857.   
  1858.   remove=rm
  1859. ! hard_link=ln
  1860. ! symbolic_link='ln -s'
  1861.   copy=cp
  1862.   
  1863. --- 89,99 ----
  1864.   
  1865.   remove=rm
  1866. ! # AmigaDOS specific change.  Although we support symbolic links using
  1867. ! # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
  1868. ! # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
  1869. ! # format.  This should probably be done by having GNU ln translate paths
  1870. ! # that start with '/' to canonical AmigaDOS device:name form.
  1871. ! hard_link=cp
  1872. ! symbolic_link=cp
  1873.   copy=cp
  1874.   
  1875. ***************
  1876. *** 154,158 ****
  1877.       ;;
  1878.        -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  1879. !     target=`echo $arg | sed 's/-*t[a-z]*=//'`
  1880.       ;; 
  1881.        -build | --build | --buil | --bui | --bu | --b)
  1882. --- 175,179 ----
  1883.       ;;
  1884.        -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  1885. !     target=`/bin/echo $arg | sed 's/-*t[a-z]*=//'`
  1886.       ;; 
  1887.        -build | --build | --buil | --bui | --bu | --b)
  1888. ***************
  1889. *** 160,164 ****
  1890.       ;;
  1891.        -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  1892. !     build=`echo $arg | sed 's/-*b[a-z]*=//'`
  1893.       ;; 
  1894.        -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  1895. --- 181,185 ----
  1896.       ;;
  1897.        -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  1898. !     build=`/bin/echo $arg | sed 's/-*b[a-z]*=//'`
  1899.       ;; 
  1900.        -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  1901. ***************
  1902. *** 166,170 ****
  1903.       ;;
  1904.        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  1905. !     prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
  1906.       ;;
  1907.        -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  1908. --- 187,191 ----
  1909.       ;;
  1910.        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  1911. !     prefix=`/bin/echo $arg | sed 's/-*p[a-z]*=//'`
  1912.       ;;
  1913.        -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  1914. ***************
  1915. *** 175,179 ****
  1916.       | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  1917.       | --loc=* | --lo=* | --l=*)
  1918. !     local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
  1919.       ;;
  1920.        -gxx-include-dir | --gxx-include-dir | --gxx-include \
  1921. --- 196,200 ----
  1922.       | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  1923.       | --loc=* | --lo=* | --l=*)
  1924. !     local_prefix=`/bin/echo $arg | sed 's/-*l[-a-z]*=//'`
  1925.       ;;
  1926.        -gxx-include-dir | --gxx-include-dir | --gxx-include \
  1927. ***************
  1928. *** 185,189 ****
  1929.       | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  1930.       | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  1931. !     gxx_include_dir=`echo $arg | sed 's/-*g[-a-z]*=//'`
  1932.       ;;
  1933.        -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  1934. --- 206,210 ----
  1935.       | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  1936.       | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  1937. !     gxx_include_dir=`/bin/echo $arg | sed 's/-*g[-a-z]*=//'`
  1938.       ;;
  1939.        -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  1940. ***************
  1941. *** 194,198 ****
  1942.       | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  1943.       | --exe=* | --ex=* | --e=*)
  1944. !     exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
  1945.       ;;
  1946.        -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  1947. --- 215,219 ----
  1948.       | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  1949.       | --exe=* | --ex=* | --e=*)
  1950. !     exec_prefix=`/bin/echo $arg | sed 's/-*e[-a-z]*=//'`
  1951.       ;;
  1952.        -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  1953. ***************
  1954. *** 390,394 ****
  1955.       # Set this to override the default target model.
  1956.       target_cpu_default=
  1957. !     # Set this to force use of install.sh.
  1958.       broken_install=
  1959.       # Set this to control which fixincludes program to use.
  1960. --- 411,416 ----
  1961.       # Set this to override the default target model.
  1962.       target_cpu_default=
  1963. !     # Set this to force use of install.sh (if set to 'yes')
  1964. !     # Set to name of installer to use a custom installer.
  1965.       broken_install=
  1966.       # Set this to control which fixincludes program to use.
  1967. ***************
  1968. *** 1225,1239 ****
  1969.           header_files=math-68881.h
  1970.           ;;
  1971.       m68k-*-lynxos*)
  1972. !         if [ x$gas = xyes ]
  1973. !         then
  1974.               tm_file=m68k/lynx.h
  1975. !         else
  1976.               tm_file=m68k/lynx-ng.h
  1977. !         fi
  1978.           xm_file=xm-lynx.h
  1979.           xmake_file=x-lynx
  1980. !         header_files=math-68881.h
  1981. !         ;;
  1982.       m68k-*-netbsd*)
  1983.           cpu_type=m68k
  1984. --- 1247,1271 ----
  1985.           header_files=math-68881.h
  1986.           ;;
  1987. +     m68k-*-amigados)
  1988. +         xm_file=m68k/xm-amigados.h
  1989. +         out_file=m68k/amigados.c
  1990. +         tm_file=m68k/amigados.h
  1991. +         tmake_file=m68k/t-amigados
  1992. +         xmake_file=m68k/x-amigados
  1993. +         fixincludes=Makefile.in # Headers are already fixed.
  1994. +         broken_install=cp
  1995. +         install_headers_dir=install-headers-cp
  1996. +         ;;
  1997.       m68k-*-lynxos*)
  1998. !           if [ x$gas = xyes ]
  1999. !           then
  2000.               tm_file=m68k/lynx.h
  2001. !           else
  2002.               tm_file=m68k/lynx-ng.h
  2003. !           fi
  2004.           xm_file=xm-lynx.h
  2005.           xmake_file=x-lynx
  2006. !           header_files=math-68881.h
  2007. !           ;;
  2008.       m68k-*-netbsd*)
  2009.           cpu_type=m68k
  2010. ***************
  2011. *** 1242,1258 ****
  2012.           fixincludes=Makefile.in
  2013.           xmake_file=x-netbsd
  2014. !         ;;
  2015.       m68k-*-sysv3*)            # Motorola m68k's running system V.3
  2016.           xm_file=m68k/xm-m68kv.h
  2017.           xmake_file=m68k/x-m68kv
  2018. !         extra_parts="crtbegin.o crtend.o"
  2019. !         header_files=math-68881.h
  2020. !         ;;
  2021.       m68k-*-sysv4*)            # Motorola m68k's running system V.4
  2022.           tm_file=m68k/m68kv4.h
  2023. !         xm_file=m68k/xm-m68kv.h
  2024.           tmake_file=t-svr4
  2025. !         header_files=math-68881.h
  2026. !         ;;
  2027.       m88k-dg-dgux*)
  2028.           case $machine in
  2029. --- 1274,1290 ----
  2030.           fixincludes=Makefile.in
  2031.           xmake_file=x-netbsd
  2032. !           ;;
  2033.       m68k-*-sysv3*)            # Motorola m68k's running system V.3
  2034.           xm_file=m68k/xm-m68kv.h
  2035.           xmake_file=m68k/x-m68kv
  2036. !           extra_parts="crtbegin.o crtend.o"
  2037. !           header_files=math-68881.h
  2038. !           ;;
  2039.       m68k-*-sysv4*)            # Motorola m68k's running system V.4
  2040.           tm_file=m68k/m68kv4.h
  2041. !           xm_file=m68k/xm-m68kv.h
  2042.           tmake_file=t-svr4
  2043. !           header_files=math-68881.h
  2044. !           ;;
  2045.       m88k-dg-dgux*)
  2046.           case $machine in
  2047. ***************
  2048. *** 2064,2068 ****
  2049.       # Also change its value of srcdir.
  2050.       # Also create a .gdbinit file which runs the one in srcdir
  2051. !     # and tells GDB to look there for source files.
  2052.       case $srcdir in
  2053.       . | ./$subdir | .././$subdir)
  2054. --- 2096,2100 ----
  2055.       # Also change its value of srcdir.
  2056.       # Also create a .gdbinit file which runs the one in srcdir
  2057. !     # and tells GDB to     look there for source files.
  2058.       case $srcdir in
  2059.       . | ./$subdir | .././$subdir)
  2060. ***************
  2061. *** 2111,2116 ****
  2062.       else
  2063.           rm -f Makefile.xx
  2064. !         abssrcdir=`cd ${srcdir}; pwd`
  2065. !         sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
  2066.           rm -f Makefile.tem
  2067.           mv Makefile.xx Makefile.tem
  2068. --- 2143,2154 ----
  2069.       else
  2070.           rm -f Makefile.xx
  2071. !          if [ x$host_broken_install = xyes ]
  2072. !          then
  2073. !              abssrcdir=`cd ${srcdir}; pwd`
  2074. !              installer=${abssrcdir}/install.sh -c
  2075. !          else
  2076. !              installer=$host_broken_install
  2077. !          fi
  2078. !          sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
  2079.           rm -f Makefile.tem
  2080.           mv Makefile.xx Makefile.tem
  2081. ***************
  2082. *** 2331,2338 ****
  2083.           if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2084.           then
  2085. !             sed -e 's,CC=set-by-configure,CC=$(CC),' \
  2086.                   Makefile.tem > Makefile.xx
  2087.           else
  2088. !             sed -e "s,CC=set-by-configure,CC=\`case '$(CC)' in stage*) echo '$(CC)' | sed -e 's|stage|../stage|g';; *) echo '$(CC)';; esac\`," \
  2089.                   Makefile.tem > Makefile.xx
  2090.           fi
  2091. --- 2369,2376 ----
  2092.           if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2093.           then
  2094. !             sed -e 's,CC=set-by-configure,CC=\$(CC),' \
  2095.                   Makefile.tem > Makefile.xx
  2096.           else
  2097. !             sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
  2098.                   Makefile.tem > Makefile.xx
  2099.           fi
  2100. ***************
  2101. *** 2412,2415 ****
  2102. --- 2450,2467 ----
  2103.       
  2104.       # If a subdirectory has a configure script, run it.
  2105. +     if [ x$subdir != x. ]
  2106. +     then
  2107. +         if [ -f $srcdir/configure ]
  2108. +         then
  2109. +             ${CONFIG_SHELL-sh} $srcdir/configure $arguments --srcdir=$srcdir
  2110. +         fi
  2111. +     fi
  2112. +     if [ xx${vint} != xx ]
  2113. +     then
  2114. +         vintmsg=" (vint)"
  2115. +     fi
  2116. +     # If a subdirectory has a configure script, run it.
  2117.       if [ x$subdir != x. ]
  2118.       then
  2119. diff -2rcN gcc-2.6.1/final.c gcc-2.6.1-amiga/final.c
  2120. *** gcc-2.6.1/final.c    Wed Sep 21 01:05:03 1994
  2121. --- gcc-2.6.1-amiga/final.c    Fri Nov  4 11:02:46 1994
  2122. ***************
  2123. *** 2022,2025 ****
  2124. --- 2022,2029 ----
  2125.     if (write_symbols != NO_DEBUG)
  2126.       {
  2127. + /* Phil.B: 03-Oct-94 added q_anote from albaugh@agames.com (Mike Albaugh) */
  2128. + #if defined(amigados) && defined(ASM_NOTE_SOURCE_LINE)
  2129. +   ASM_NOTE_SOURCE_LINE(file,last_linenum,filename);
  2130. + #endif
  2131.   #ifdef SDB_DEBUGGING_INFO
  2132.         if (write_symbols == SDB_DEBUG
  2133. diff -2rcN gcc-2.6.1/gcc.c gcc-2.6.1-amiga/gcc.c
  2134. *** gcc-2.6.1/gcc.c    Thu Oct 27 22:49:58 1994
  2135. --- gcc-2.6.1-amiga/gcc.c    Fri Nov  4 11:02:48 1994
  2136. ***************
  2137. *** 208,211 ****
  2138. --- 208,216 ----
  2139.   static int save_temps_flag;
  2140.   
  2141. + #ifdef amigados
  2142. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  2143. + static int amiga_priority = 0;
  2144. + #endif /* amigados */
  2145.   /* The compiler version.  */
  2146.   
  2147. ***************
  2148. *** 837,840 ****
  2149. --- 842,849 ----
  2150.      {"--pipe", "-pipe", 0},
  2151.      {"--prefix", "-B", "a"},
  2152. + /* Phil.B: 03-Oct-94, allow priority settings for all programs started by gcc */
  2153. + #ifdef amigados
  2154. +    {"--priority", "-P", "a"},
  2155. + #endif /* amigados */
  2156.      {"--preprocess", "-E", 0},
  2157.      {"--print-file-name", "-print-file-name=", "aj"},
  2158. ***************
  2159. *** 928,932 ****
  2160.               arg = argv[i] + optlen + 1;
  2161.   
  2162. !               /* If this mapping requires extra text at end of name,
  2163.                accept that as "argument".  */
  2164.                 else if (index (arginfo, '*') != 0)
  2165. --- 937,941 ----
  2166.               arg = argv[i] + optlen + 1;
  2167.   
  2168. !               /* If this mapping allows extra text at end of name,
  2169.                accept that as "argument".  */
  2170.                 else if (index (arginfo, '*') != 0)
  2171. ***************
  2172. *** 985,990 ****
  2173.           }
  2174.         i++;
  2175. -     }
  2176.   
  2177.         /* Handle old-fashioned options--just copy them through,
  2178.        with their arguments.  */
  2179. --- 994,999 ----
  2180.           }
  2181.         i++;
  2182.   
  2183. +     }
  2184.         /* Handle old-fashioned options--just copy them through,
  2185.        with their arguments.  */
  2186. ***************
  2187. *** 1340,1348 ****
  2188.   
  2189.   #ifndef STANDARD_EXEC_PREFIX
  2190. ! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
  2191.   #endif /* !defined STANDARD_EXEC_PREFIX */
  2192.   
  2193.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  2194. ! static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
  2195.   #ifdef MD_EXEC_PREFIX
  2196.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  2197. --- 1349,1357 ----
  2198.   
  2199.   #ifndef STANDARD_EXEC_PREFIX
  2200. ! #define STANDARD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
  2201.   #endif /* !defined STANDARD_EXEC_PREFIX */
  2202.   
  2203.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  2204. ! static char *standard_exec_prefix_1 = "/local/lib/gcc-lib/";
  2205.   #ifdef MD_EXEC_PREFIX
  2206.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  2207. ***************
  2208. *** 1350,1354 ****
  2209.   
  2210.   #ifndef STANDARD_STARTFILE_PREFIX
  2211. ! #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
  2212.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  2213.   
  2214. --- 1359,1363 ----
  2215.   
  2216.   #ifndef STANDARD_STARTFILE_PREFIX
  2217. ! #define STANDARD_STARTFILE_PREFIX "/gnu/lib/"
  2218.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  2219.   
  2220. ***************
  2221. *** 1360,1368 ****
  2222.   #endif
  2223.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  2224. ! static char *standard_startfile_prefix_1 = "/lib/";
  2225. ! static char *standard_startfile_prefix_2 = "/usr/lib/";
  2226.   
  2227.   #ifndef TOOLDIR_BASE_PREFIX
  2228. ! #define TOOLDIR_BASE_PREFIX "/usr/local/"
  2229.   #endif
  2230.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  2231. --- 1369,1377 ----
  2232.   #endif
  2233.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  2234. ! static char *standard_startfile_prefix_1 = "/local/lib/";
  2235. ! static char *standard_startfile_prefix_2 = "/local/lib/";
  2236.   
  2237.   #ifndef TOOLDIR_BASE_PREFIX
  2238. ! #define TOOLDIR_BASE_PREFIX "/local/"
  2239.   #endif
  2240.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  2241. ***************
  2242. *** 1565,1568 ****
  2243. --- 1574,1581 ----
  2244.   #endif
  2245.   
  2246. + #ifdef amigados
  2247. +   if (!base) /* No env var set */
  2248. +     base = "RAM:";
  2249. + #else
  2250.     base = choose_temp_base_try (concat4 (dir_separator_str, "usr", 
  2251.                                           dir_separator_str, "tmp"), 
  2252. ***************
  2253. *** 1570,1573 ****
  2254. --- 1583,1588 ----
  2255.     base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base);
  2256.    
  2257. + #endif
  2258.     /* If all else fails, use the current directory! */  
  2259.     if (base == (char *)0) base = concat(".", dir_separator_str);
  2260. ***************
  2261. *** 1578,1582 ****
  2262.     strcpy (temp_filename, base);
  2263.     if (len > 0 && temp_filename[len-1] != '/'
  2264. !       && temp_filename[len-1] != DIR_SEPARATOR)
  2265.       temp_filename[len++] = DIR_SEPARATOR;
  2266.     strcpy (temp_filename + len, "ccXXXXXX");
  2267. --- 1593,1601 ----
  2268.     strcpy (temp_filename, base);
  2269.     if (len > 0 && temp_filename[len-1] != '/'
  2270. !       && temp_filename[len-1] != DIR_SEPARATOR
  2271. ! #ifdef amigados
  2272. !                         && temp_filename[len-1] != ':'
  2273. ! #endif
  2274. !     )
  2275.       temp_filename[len++] = DIR_SEPARATOR;
  2276.     strcpy (temp_filename + len, "ccXXXXXX");
  2277. ***************
  2278. *** 1723,1727 ****
  2279.     /* Determine the filename to execute (special case for absolute paths).  */
  2280.   
  2281. !   if (*name == '/' || *name == DIR_SEPARATOR)
  2282.       {
  2283.         if (access (name, mode))
  2284. --- 1742,1750 ----
  2285.     /* Determine the filename to execute (special case for absolute paths).  */
  2286.   
  2287. !   if (*name == '/' || *name == DIR_SEPARATOR
  2288. ! #ifdef amigados
  2289. !           || index (name, ':')
  2290. ! #endif
  2291. !     )
  2292.       {
  2293.         if (access (name, mode))
  2294. ***************
  2295. *** 1943,1946 ****
  2296. --- 1966,1970 ----
  2297.      (i.e. its output should be piped to the next one.)  */
  2298.   
  2299. + #ifndef PEXECUTE
  2300.   #ifdef __MSDOS__
  2301.   
  2302. ***************
  2303. *** 2144,2149 ****
  2304.     return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv));
  2305.   }
  2306. ! #endif /* OS2 or WINNT */
  2307.   
  2308.   /* Execute the command specified by the arguments on the current line of spec.
  2309. --- 2168,2173 ----
  2310.     return (search_flag ? spawnv : spawnvp) (1, program, FIX_ARGV (argv));
  2311.   }
  2312. ! #endif /* not OS2 or WINNT*/
  2313. ! #endif /* !defined (PEXECUTE) */
  2314.   
  2315.   /* Execute the command specified by the arguments on the current line of spec.
  2316. ***************
  2317. *** 2240,2246 ****
  2318. --- 2264,2276 ----
  2319.         char *string = commands[i].argv[0];
  2320.   
  2321. + #ifdef PEXECUTE
  2322. +       commands[i].pid = PEXECUTE (string != commands[i].prog,
  2323. +                   string, commands[i].argv,
  2324. +                   i + 1 < n_commands);
  2325. + #else
  2326.         commands[i].pid = pexecute (string != commands[i].prog,
  2327.                     string, commands[i].argv,
  2328.                     i + 1 < n_commands);
  2329. + #endif
  2330.   
  2331.         if (string != commands[i].prog)
  2332. ***************
  2333. *** 2263,2266 ****
  2334. --- 2293,2299 ----
  2335.       char *prog = "unknown";
  2336.   
  2337. + #ifdef PEXECUTE_RESULT
  2338. +     pid = PEXECUTE_RESULT (status, commands[i]);
  2339. + #else /* PEXECUTE_RESULT */
  2340.   #ifdef __MSDOS__
  2341.           status = pid = commands[i].pid;
  2342. ***************
  2343. *** 2269,2275 ****
  2344. --- 2302,2310 ----
  2345.       pid = cwait (&status, commands[i].pid, WAIT_CHILD);
  2346.   #else
  2347.       pid = wait (&status);
  2348.   #endif
  2349.   #endif
  2350. + #endif /* PEXECUTE_RESULT */
  2351.       if (pid < 0)
  2352.         abort ();
  2353. ***************
  2354. *** 2390,2393 ****
  2355. --- 2425,2429 ----
  2356.           {
  2357.             strncpy (nstore, startp, endp-startp);
  2358. + #ifndef amigados
  2359.             if (endp == startp)
  2360.           strcpy (nstore, concat (".", dir_separator_str));
  2361. ***************
  2362. *** 2399,2402 ****
  2363. --- 2435,2447 ----
  2364.             else
  2365.           nstore[endp-startp] = 0;
  2366. + #else
  2367. +           if (endp[-1] != '/' && endp[-1] != ':')
  2368. +         {
  2369. +           nstore[endp-startp] = '/';
  2370. +           nstore[endp-startp+1] = 0;
  2371. +         }
  2372. +           else
  2373. +         nstore[endp-startp] = 0;
  2374. + #endif
  2375.             add_prefix (&exec_prefixes, nstore, 0, 0, NULL_PTR);
  2376.             if (*endp == 0)
  2377. ***************
  2378. *** 2421,2424 ****
  2379. --- 2466,2470 ----
  2380.           {
  2381.             strncpy (nstore, startp, endp-startp);
  2382. + #ifndef amigados
  2383.             if (endp == startp)
  2384.           strcpy (nstore, concat (".", dir_separator_str));
  2385. ***************
  2386. *** 2430,2433 ****
  2387. --- 2476,2488 ----
  2388.             else
  2389.           nstore[endp-startp] = 0;
  2390. + #else
  2391. +           if (endp[-1] != '/' && endp[-1] != ':')
  2392. +         {
  2393. +           nstore[endp-startp] = '/';
  2394. +           nstore[endp-startp+1] = 0;
  2395. +         }
  2396. +           else
  2397. +         nstore[endp-startp] = 0;
  2398. + #endif
  2399.             add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
  2400.             if (*endp == 0)
  2401. ***************
  2402. *** 2453,2460 ****
  2403.           {
  2404.             strncpy (nstore, startp, endp-startp);
  2405.             if (endp == startp)
  2406.           strcpy (nstore, concat (".", dir_separator_str));
  2407.             else if (endp[-1] != '/' && endp[-1] != DIR_SEPARATOR)
  2408. !         {
  2409.             nstore[endp-startp] = DIR_SEPARATOR;
  2410.             nstore[endp-startp+1] = 0;
  2411. --- 2508,2516 ----
  2412.           {
  2413.             strncpy (nstore, startp, endp-startp);
  2414. + #ifndef amigados
  2415.             if (endp == startp)
  2416.           strcpy (nstore, concat (".", dir_separator_str));
  2417.             else if (endp[-1] != '/' && endp[-1] != DIR_SEPARATOR)
  2418. !           {
  2419.             nstore[endp-startp] = DIR_SEPARATOR;
  2420.             nstore[endp-startp+1] = 0;
  2421. ***************
  2422. *** 2462,2465 ****
  2423. --- 2518,2530 ----
  2424.             else
  2425.           nstore[endp-startp] = 0;
  2426. + #else
  2427. +           if (endp[-1] != '/' && endp[-1] != ':')
  2428. +         {
  2429. +           nstore[endp-startp] = '/';
  2430. +           nstore[endp-startp+1] = 0;
  2431. +         }
  2432. +           else
  2433. +         nstore[endp-startp] = 0;
  2434. + #endif
  2435.             add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
  2436.             if (*endp == 0)
  2437. ***************
  2438. *** 2481,2484 ****
  2439. --- 2546,2559 ----
  2440.     for (i = 1; i < argc; i++)
  2441.       {
  2442. + #ifdef amigados
  2443. +       /* Phil.B 03-Oct-94 added -priority keyword */
  2444. +       if (! strcmp (argv[i], "-priority"))
  2445. +         {
  2446. +       if (i + 1 == argc)
  2447. +         fatal ("argument to `-priority' is missing");
  2448. +           amiga_priority = atoi(argv[++i]);
  2449. +         }
  2450. +       else
  2451. + #endif /* amigados */
  2452.         if (! strcmp (argv[i], "-dumpspecs"))
  2453.       {
  2454. ***************
  2455. *** 2658,2661 ****
  2456. --- 2733,2747 ----
  2457.             break;
  2458.   
  2459. + #ifdef amigados
  2460. +             case 'P': /* Phil.B 03-Oct-94 added -priority keyword */
  2461. +           if (p[1] == 0 && i + 1 == argc)
  2462. +         fatal ("argument to `-P' is missing");
  2463. +           if (p[1] == 0)
  2464. +         amiga_priority = atoi(argv[++i]);
  2465. +           else
  2466. +         amiga_priority = atoi((char *)(p + 1));
  2467. +           break;
  2468. + #endif /* amigados */
  2469.           case 'v':    /* Print our subcommands and print versions.  */
  2470.             n_switches++;
  2471. ***************
  2472. *** 2746,2753 ****
  2473.     add_prefix (&exec_prefixes, 
  2474.                 concat3 (tooldir_prefix, "bin", dir_separator_str),
  2475. !           0, 0, NULL_PTR);
  2476.     add_prefix (&startfile_prefixes,
  2477.             concat3 (tooldir_prefix, "lib", dir_separator_str),
  2478. !           0, 0, NULL_PTR);
  2479.   
  2480.     /* More prefixes are enabled in main, after we read the specs file
  2481. --- 2832,2839 ----
  2482.     add_prefix (&exec_prefixes, 
  2483.                 concat3 (tooldir_prefix, "bin", dir_separator_str),
  2484. !             0, 0, NULL_PTR);
  2485.     add_prefix (&startfile_prefixes,
  2486.             concat3 (tooldir_prefix, "lib", dir_separator_str),
  2487. !             0, 0, NULL_PTR);
  2488.   
  2489.     /* More prefixes are enabled in main, after we read the specs file
  2490. ***************
  2491. *** 2830,2834 ****
  2492.         register int c = *p;
  2493.   
  2494. !       if (c == 'B' || c == 'b' || c == 'V')
  2495.           {
  2496.             /* Skip a separate arg, if any.  */
  2497. --- 2916,2925 ----
  2498.         register int c = *p;
  2499.   
  2500. !           /* Phil.B: 05-Oct-94 added support for '-P' */
  2501. !       if (c == 'B' || c == 'b' || c == 'V'
  2502. ! #ifdef amigados
  2503. !           || c == 'P'
  2504. ! #endif /* amigdos */
  2505. ! )
  2506.           {
  2507.             /* Skip a separate arg, if any.  */
  2508. ***************
  2509. *** 4398,4405 ****
  2510. --- 4489,4500 ----
  2511.         int len;
  2512.   
  2513. + #ifdef FILE_NAME_NONDIRECTORY
  2514. +       input_basename = FILE_NAME_NONDIRECTORY (input_filename);
  2515. + #else
  2516.         input_basename = input_filename;
  2517.         for (p = input_filename; *p; p++)
  2518.           if (*p == '/' || *p == DIR_SEPARATOR)
  2519.             input_basename = p + 1;
  2520. + #endif
  2521.   
  2522.         /* Find a suffix starting with the last period,
  2523. ***************
  2524. *** 4613,4628 ****
  2525.   }
  2526.   
  2527. ! /* Return a newly-allocated string whose contents concatenate those of s1, s2 */
  2528.   
  2529. ! static char *
  2530.   concat (s1, s2)
  2531.        char *s1, *s2;
  2532. ! {
  2533.     int len1 = strlen (s1);
  2534.     int len2 = strlen (s2);
  2535.     char *result = xmalloc (len1 + len2 + 1);
  2536. !   strcpy (result, s1);
  2537. !   strcpy (result + len1, s2);
  2538.     *(result + len1 + len2) = 0;
  2539.   
  2540. --- 4708,4723 ----
  2541.   }
  2542.   
  2543. ! /* Return a newly-allocated string whose contents concatenate those of s1, s2, s3.  */
  2544.   
  2545. !   static char *
  2546.   concat (s1, s2)
  2547.        char *s1, *s2;
  2548. !   {
  2549.     int len1 = strlen (s1);
  2550.     int len2 = strlen (s2);
  2551.     char *result = xmalloc (len1 + len2 + 1);
  2552. !   
  2553. !     strcpy (result, s1);
  2554. !     strcpy (result + len1, s2);
  2555.     *(result + len1 + len2) = 0;
  2556.   
  2557. diff -2rcN gcc-2.6.1/genconfig.c gcc-2.6.1-amiga/genconfig.c
  2558. *** gcc-2.6.1/genconfig.c    Wed Jun 15 08:37:01 1994
  2559. --- gcc-2.6.1-amiga/genconfig.c    Fri Nov  4 11:02:48 1994
  2560. ***************
  2561. *** 304,309 ****
  2562. --- 304,317 ----
  2563.   from the machine description file `md'.  */\n\n");
  2564.   
  2565. + #ifdef amigados
  2566. +   /* this constant probably better be 14 in general, or a cross compiling
  2567. +      host might choke on some amigados header files... */
  2568. +   /* Allow at least 14 operands for the sake of asm constructs.  */
  2569. +   max_recog_operands = 14;
  2570. + #else
  2571.     /* Allow at least 10 operands for the sake of asm constructs.  */
  2572.     max_recog_operands = 9;  /* We will add 1 later.  */
  2573. + #endif
  2574.     max_dup_operands = 1;
  2575.   
  2576. diff -2rcN gcc-2.6.1/ginclude/stdarg.h gcc-2.6.1-amiga/ginclude/stdarg.h
  2577. *** gcc-2.6.1/ginclude/stdarg.h    Sat Jul  9 03:04:27 1994
  2578. --- gcc-2.6.1-amiga/ginclude/stdarg.h    Fri Nov  4 11:02:49 1994
  2579. ***************
  2580. *** 157,159 ****
  2581. --- 157,167 ----
  2582.   
  2583.   #endif /* not _ANSI_STDARG_H_ */
  2584. + #ifdef amigados
  2585. + # ifndef _VA_LIST
  2586. + #  define _VA_LIST
  2587. +    typedef __gnuc_va_list va_list;
  2588. + # endif
  2589. + #endif /* amigados */
  2590.   #endif /* not _STDARG_H */
  2591. diff -2rcN gcc-2.6.1/ginclude/stddef.h gcc-2.6.1-amiga/ginclude/stddef.h
  2592. *** gcc-2.6.1/ginclude/stddef.h    Fri Oct  7 23:22:35 1994
  2593. --- gcc-2.6.1-amiga/ginclude/stddef.h    Fri Nov  4 11:02:49 1994
  2594. ***************
  2595. *** 4,7 ****
  2596. --- 4,47 ----
  2597.   #ifndef __STDDEF_H__
  2598.   
  2599. + #ifdef amigados
  2600. + /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
  2601. +    just as well. The system headers are ANSI compliant, the used compiler IS
  2602. +    gcc, so it's really ok to use the system header, no reason to hassle
  2603. +    with a jungle of ifdefs. Besides, amigados is only defined if compiling
  2604. +    with host=amigados, it doesn't apply if compiling with target=amigados
  2605. +    on a different host with possibly different system headers. Same thing
  2606. +    would apply to gstdarg.h and gvarargs.h, but those headers are more
  2607. +    easily fixable than this one and I'm sick of writing the same comment
  2608. +    there as well. MW
  2609. +    Include the contents of <stddef.h> inline rather than with a #include,
  2610. +    to avoid infinite include recursion when this file is installed in
  2611. +    gcc's include directory as stddef.h.  (fnf)  */
  2612. + #define _STDDEF_H_
  2613. + #include <machine/ansi.h>
  2614. + typedef    _PTRDIFF_T_    ptrdiff_t;
  2615. + #ifdef    _SIZE_T_
  2616. + typedef    _SIZE_T_    size_t;
  2617. + #undef    _SIZE_T_
  2618. + #endif
  2619. + #ifdef    _WCHAR_T_
  2620. + typedef    _WCHAR_T_    wchar_t;
  2621. + #undef    _WCHAR_T_
  2622. + #endif
  2623. + #ifndef    NULL
  2624. + #define    NULL    0
  2625. + #endif
  2626. + #define    offsetof(type, member)    ((size_t)(&((type *)0)->member))
  2627. + #else /* not amigados */
  2628.   /* Any one of these symbols __need_* means that GNU libc
  2629.      wants us just to define one data type.  So don't define
  2630. ***************
  2631. *** 202,205 ****
  2632. --- 242,247 ----
  2633.   #define __WCHAR_TYPE__ int
  2634.   #endif
  2635. + #endif /* not  amigados */
  2636.   typedef __WCHAR_TYPE__ wchar_t;
  2637.   #endif
  2638. diff -2rcN gcc-2.6.1/ginclude/varargs.h gcc-2.6.1-amiga/ginclude/varargs.h
  2639. *** gcc-2.6.1/ginclude/varargs.h    Sat Jul  9 03:04:32 1994
  2640. --- gcc-2.6.1-amiga/ginclude/varargs.h    Fri Nov  4 11:02:50 1994
  2641. ***************
  2642. *** 174,175 ****
  2643. --- 174,182 ----
  2644.   #undef _BSD_VA_LIST
  2645.   #endif
  2646. + #ifdef amigados
  2647. + # ifndef _VA_LIST
  2648. + #  define _VA_LIST
  2649. +    typedef __gnuc_va_list va_list;
  2650. + # endif
  2651. + #endif /* amigados */
  2652. diff -2rcN gcc-2.6.1/protoize.c gcc-2.6.1-amiga/protoize.c
  2653. *** gcc-2.6.1/protoize.c    Wed Oct  5 03:17:40 1994
  2654. --- gcc-2.6.1-amiga/protoize.c    Fri Nov  4 11:02:51 1994
  2655. ***************
  2656. *** 843,848 ****
  2657. --- 843,853 ----
  2658.     struct default_include *p;
  2659.   
  2660. + #ifdef FILE_NAME_ABSOLUTE_P
  2661. +   if (! FILE_NAME_ABSOLUTE_P (path))
  2662. +     abort ();
  2663. + #else
  2664.     if (path[0] != '/')
  2665.       abort ();        /* Must be an absolutized filename.  */
  2666. + #endif
  2667.   
  2668.     for (p = include_defaults; p->fname; p++)
  2669. ***************
  2670. *** 1271,1275 ****
  2671. --- 1276,1284 ----
  2672.       const char *src_p;
  2673.   
  2674. + #ifdef FILE_NAME_ABSOLUTE_P
  2675. +     if (! FILE_NAME_ABSOLUTE_P (rel_filename))
  2676. + #else
  2677.       if (rel_filename[0] != '/')
  2678. + #endif
  2679.         {
  2680.           src_p = cwd2;
  2681. ***************
  2682. *** 1534,1537 ****
  2683. --- 1543,1565 ----
  2684.   }
  2685.   
  2686. + /* Use this macro to advance a char * over the filename part in a line
  2687. +    read from an aux-info file. */
  2688. + #ifndef amigados
  2689. + /* Version for file systems where the colon has no special meaning */
  2690. + #define ADVANCE_PAST_FILENAME(CP) \
  2691. +   while (* (CP) != ':') (CP)++
  2692. + #else
  2693. + /* Have to heuristically decide whether the colon is part of the filename
  2694. +    or whether it serves to delimit the filename from the line number. If
  2695. +    it's the latter case, then the character following the colon *must*
  2696. +    be a digit. Note that this heuristic fails if the filename starts
  2697. +    with a digit. */
  2698. + #define ADVANCE_PAST_FILENAME(CP) \
  2699. +     while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
  2700. +       (CP)++;
  2701. + #endif
  2702.   /* Given a line from  an aux info file, and a time at which the aux info
  2703.      file it came from was created, check to see if the item described in
  2704. ***************
  2705. *** 1555,1560 ****
  2706.       const char *filename_start = p = l + 3;
  2707.   
  2708. !     while (*p != ':')
  2709. !       p++;
  2710.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2711.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2712. --- 1583,1587 ----
  2713.       const char *filename_start = p = l + 3;
  2714.   
  2715. !     ADVANCE_PAST_FILENAME (p);
  2716.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2717.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2718. ***************
  2719. *** 1613,1618 ****
  2720.       char *filename;
  2721.   
  2722. !     while (*p != ':')
  2723. !       p++;
  2724.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2725.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2726. --- 1640,1644 ----
  2727.       char *filename;
  2728.   
  2729. !     ADVANCE_PAST_FILENAME (p);
  2730.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2731.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2732. ***************
  2733. *** 2334,2338 ****
  2734.       char *p = aux_info_base;
  2735.   
  2736. !     while (*p != ':')
  2737.         p++;
  2738.       p++;
  2739. --- 2360,2366 ----
  2740.       char *p = aux_info_base;
  2741.   
  2742. !     /* have to make sure at least one space is following the colon to make
  2743. !        sure the colon is not part of the filename */
  2744. !     while (*p != ':' && p[1] != ' ')
  2745.         p++;
  2746.       p++;
  2747. ***************
  2748. *** 2348,2352 ****
  2749.       aux_info_second_line = p;
  2750.       aux_info_relocated_name = 0;
  2751. !     if (invocation_filename[0] != '/')
  2752.         {
  2753.       /* INVOCATION_FILENAME is relative;
  2754. --- 2376,2384 ----
  2755.       aux_info_second_line = p;
  2756.       aux_info_relocated_name = 0;
  2757. ! #ifdef FILE_NAME_ABSOLUTE_P
  2758. !     if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
  2759. ! #else
  2760. !       if (invocation_filename[0] != '/')
  2761. ! #endif
  2762.         {
  2763.       /* INVOCATION_FILENAME is relative;
  2764. ***************
  2765. *** 2437,2441 ****
  2766.   
  2767.   /* Check an individual filename for a .c suffix.  If the filename has this
  2768. !    suffix, rename the file such that its suffix is changed to .C.  This
  2769.      function implements the -C option.  */
  2770.   
  2771. --- 2469,2473 ----
  2772.   
  2773.   /* Check an individual filename for a .c suffix.  If the filename has this
  2774. !    suffix, rename the file such that its suffix is changed to .cc.  This
  2775.      function implements the -C option.  */
  2776.   
  2777. ***************
  2778. *** 2446,2450 ****
  2779.     const char *filename = hp->symbol;
  2780.     int last_char_index = strlen (filename) - 1;
  2781. !   char *const new_filename = (char *) alloca (strlen (filename) + 1);
  2782.   
  2783.     /* Note that we don't care here if the given file was converted or not.  It
  2784. --- 2478,2482 ----
  2785.     const char *filename = hp->symbol;
  2786.     int last_char_index = strlen (filename) - 1;
  2787. !   char *const new_filename = (char *) alloca (strlen (filename) + 2);
  2788.   
  2789.     /* Note that we don't care here if the given file was converted or not.  It
  2790. ***************
  2791. *** 2458,2463 ****
  2792.   
  2793.     strcpy (new_filename, filename);
  2794. !   new_filename[last_char_index] = 'C';
  2795.   
  2796.     if (my_link (filename, new_filename) == -1)
  2797.       {
  2798. --- 2490,2512 ----
  2799.   
  2800.     strcpy (new_filename, filename);
  2801. !   strcat (new_filename + last_char_index, "cc");
  2802. !   
  2803. !   /* use rename(2) if available !! Update config files to include HAVE_rename
  2804. !      if the used OS provides it. Advantages are: it's atomic, it's one
  2805. !      system call compared to two. */
  2806. ! #ifdef HAVE_rename
  2807. !   /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
  2808. !      to be changed to `my_rename' as well. */
  2809.   
  2810. +   if (rename (filename, new_filename) == -1)
  2811. +     {
  2812. +       fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
  2813. +            pname, shortpath (NULL, filename),
  2814. +            shortpath (NULL, new_filename), sys_errlist[errno]);
  2815. +       errors++;
  2816. +       return;
  2817. +     }
  2818. + #else
  2819.     if (my_link (filename, new_filename) == -1)
  2820.       {
  2821. ***************
  2822. *** 2476,2479 ****
  2823. --- 2525,2529 ----
  2824.         return;
  2825.       }
  2826. + #endif
  2827.   }
  2828.   
  2829. diff -2rcN gcc-2.6.1/real.c gcc-2.6.1-amiga/real.c
  2830. *** gcc-2.6.1/real.c    Tue Jun 28 10:13:52 1994
  2831. --- gcc-2.6.1-amiga/real.c    Fri Nov  4 11:02:52 1994
  2832. ***************
  2833. *** 4280,4286 ****
  2834. --- 4280,4292 ----
  2835.       {
  2836.         if (sign)
  2837. + #ifdef amigados
  2838.       sprintf (wstring, " -Infinity ");
  2839.         else
  2840.       sprintf (wstring, " Infinity ");
  2841. + #else
  2842. +     sprintf (wstring, " -NaN ");
  2843. +       else
  2844. +     sprintf (wstring, " NaN ");
  2845. + #endif
  2846.         goto bxit;
  2847.       }
  2848. diff -2rcN gcc-2.6.1/scan-types.sh gcc-2.6.1-amiga/scan-types.sh
  2849. *** gcc-2.6.1/scan-types.sh    Mon Apr 18 08:07:12 1994
  2850. --- gcc-2.6.1-amiga/scan-types.sh    Fri Nov  4 11:02:52 1994
  2851. ***************
  2852. *** 1,3 ****
  2853. ! #! /bin/sh
  2854.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  2855.   # Emits macros definitions for these, and some other types.
  2856. --- 1,3 ----
  2857. ! #!/bin/sh
  2858.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  2859.   # Emits macros definitions for these, and some other types.
  2860. diff -2rcN gcc-2.6.1/toplev.c gcc-2.6.1-amiga/toplev.c
  2861. *** gcc-2.6.1/toplev.c    Tue Oct 25 20:09:12 1994
  2862. --- gcc-2.6.1-amiga/toplev.c    Fri Nov  4 11:02:53 1994
  2863. ***************
  2864. *** 136,139 ****
  2865. --- 136,150 ----
  2866.   static char *decl_name ();
  2867.   
  2868. + #ifdef amigados
  2869. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  2870. + static int amiga_priority = -1;
  2871. + /* Handle new stack allocating */
  2872. + #include <proto/exec.h>
  2873. + struct Task *amiga_task;
  2874. + struct StackSwapStruct oldstack, newstack;
  2875. + long amiga_stksize = 50000;
  2876. + int amiga_newstack = FALSE;
  2877. + #endif /* amigados */
  2878.   /* Name of program invoked, sans directories.  */
  2879.   
  2880. ***************
  2881. *** 531,534 ****
  2882. --- 542,546 ----
  2883.     {"writable-strings", &flag_writable_strings, 1},
  2884.     {"peephole", &flag_no_peephole, 0},
  2885. +   {"large-baserel", &flag_pic, 4},
  2886.     {"force-mem", &flag_force_mem, 1},
  2887.     {"force-addr", &flag_force_addr, 1},
  2888. ***************
  2889. *** 549,552 ****
  2890. --- 561,565 ----
  2891.     {"pic", &flag_pic, 1},
  2892.     {"PIC", &flag_pic, 2},
  2893. +   {"baserel", &flag_pic, 3},
  2894.     {"fast-math", &flag_fast_math, 1},
  2895.     {"common", &flag_no_common, 0},
  2896. ***************
  2897. *** 1967,1970 ****
  2898. --- 1980,1986 ----
  2899.        char *input_name;
  2900.   {
  2901. + #ifdef FILE_NAME_NONDIRECTORY
  2902. +   char *na = FILE_NAME_NONDIRECTORY (input_name);
  2903. + #else
  2904.     int len = strlen (input_name);
  2905.     char *na = input_name + len;
  2906. ***************
  2907. *** 1977,1980 ****
  2908. --- 1993,1997 ----
  2909.         na--;
  2910.       }
  2911. + #endif
  2912.   
  2913.   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
  2914. ***************
  2915. *** 3369,3372 ****
  2916. --- 3386,3398 ----
  2917.   #endif /* RLIMIT_STACK */
  2918.   
  2919. + #ifdef amigados
  2920. +   {
  2921. +     char *envstr;
  2922. +     if (envstr = getenv("GCCSTACK"))
  2923. +       if ((i = atoi(envstr)) > amiga_stksize) amiga_stksize = i;
  2924. +   }
  2925. + #endif /* amigados */
  2926.     signal (SIGFPE, float_signal);
  2927.   
  2928. ***************
  2929. *** 3613,3616 ****
  2930. --- 3639,3667 ----
  2931.         else if (!strcmp (str, "pedantic-errors"))
  2932.           flag_pedantic_errors = pedantic = 1;
  2933. + #ifdef amigados
  2934. +       else if (!strcmp (str, "priority"))
  2935. +         {
  2936. +           char *p = str + 1;
  2937. +           if (*p)
  2938. +         amiga_priority = atoi (p);
  2939. +               if (amiga_priority < -25)
  2940. +             amiga_priority = -25;
  2941. +               else if (amiga_priority > 25)
  2942. +             amiga_priority = 25;
  2943. +         }
  2944. + #if 0
  2945. +       else if (!strcmp (str, "stacksize"))
  2946. +         {
  2947. +           char *p = str + 1;
  2948. +           long size;
  2949. +           if (*p)
  2950. +         size = atoi (p);
  2951. +               if ((size > 0) && (size > amiga_stksize))
  2952. +             amiga_stksize = size;
  2953. +         }
  2954. + #endif
  2955. + #endif /* amigados */
  2956.         else if (!strcmp (str, "quiet"))
  2957.           quiet_flag = 1;
  2958. ***************
  2959. *** 3862,3865 ****
  2960. --- 3913,3946 ----
  2961.       }
  2962.   
  2963. + #ifdef amigados
  2964. +   Forbid();
  2965. +   amiga_task = FindTask(NULL);
  2966. +   oldstack.stk_Lower = amiga_task->tc_SPLower;
  2967. +   oldstack.stk_Upper = amiga_task->tc_SPUpper;
  2968. +   oldstack.stk_Pointer = amiga_task->tc_SPReg;
  2969. +   newstack.stk_Lower = (APTR)((long)oldstack.stk_Upper - (long)oldstack.stk_Lower);
  2970. +   Permit();
  2971. +   SetTaskPri(amiga_task, amiga_priority);
  2972. +   /* Allocate new stack (50000 default). First check if new stack > existing
  2973. +      stacksize */
  2974. +   amiga_newstack = FALSE;
  2975. + #if 0
  2976. +   if ((long)newstack.stk_Lower < amiga_stksize) {
  2977. +     Forbid();
  2978. +     if (newstack.stk_Lower = (APTR)malloc(amiga_stksize)) {
  2979. +       long stk_offset = (long)oldstack.stk_Upper - (long)oldstack.stk_Pointer;
  2980. +       amiga_newstack = TRUE;
  2981. +       newstack.stk_Upper = (APTR)((long)newstack.stk_Lower + amiga_stksize);
  2982. +       newstack.stk_Pointer = (APTR)((long)newstack.stk_Upper - stk_offset);
  2983. +       bcopy(oldstack.stk_Pointer, newstack.stk_Pointer, stk_offset);
  2984. +       StackSwap(&newstack);
  2985. +     } else
  2986. +       error("Can't allocate new %ld stack", amiga_stksize);
  2987. +     Permit();
  2988. +   }
  2989. + #endif
  2990. + #endif /* amigados */
  2991.     /* Initialize for bytecode output.  A good idea to do this as soon as
  2992.        possible after the "-f" options have been parsed. */
  2993. ***************
  2994. *** 3948,3952 ****
  2995.     compile_file (filename);
  2996.   
  2997. ! #if !defined(OS2) && !defined(VMS) && !defined(WINNT)
  2998.     if (flag_print_mem)
  2999.       {
  3000. --- 4029,4033 ----
  3001.     compile_file (filename);
  3002.   
  3003. ! #if !defined(OS2) && !defined(VMS) && !defined(WINNT) && !defined(amigados)
  3004.     if (flag_print_mem)
  3005.       {
  3006. ***************
  3007. *** 3966,3970 ****
  3008.   #endif /* not USG */
  3009.       }
  3010. ! #endif /* not OS2 and not VMS and not WINNT */
  3011.   
  3012.     if (errorcount)
  3013. --- 4047,4060 ----
  3014.   #endif /* not USG */
  3015.       }
  3016. ! #endif /* not OS2 and not VMS and not WINNT and not amigados*/
  3017. ! #if 0
  3018. !   if (amiga_newstack) {
  3019. !     Forbid();
  3020. !     StackSwap(&newstack);
  3021. !     free(newstack.stk_Lower);
  3022. !     Permit();
  3023. !   }
  3024. ! #endif
  3025.   
  3026.     if (errorcount)
  3027. diff -2rcN gcc-2.6.1/version.c gcc-2.6.1-amiga/version.c
  3028. *** gcc-2.6.1/version.c    Sun Oct 30 13:05:06 1994
  3029. --- gcc-2.6.1-amiga/version.c    Fri Nov  4 11:02:54 1994
  3030. ***************
  3031. *** 1 ****
  3032. --- 1,2 ----
  3033.   char *version_string = "2.6.1";
  3034. + char VERSION[]="$VER:gcc 2.6.1 last compiled on "__DATE__" "__TIME__;
  3035.